vim-web 0.3.44-dev.25 → 0.3.44-dev.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/vim-web.js CHANGED
@@ -60766,11 +60766,20 @@ class Vim2 {
60766
60766
  */
60767
60767
  removeHighlight(nodes, fallback) {
60768
60768
  const toUpdate = [];
60769
- for (const node of nodes) {
60770
- const state = this._nodeStates.get(node);
60771
- if (state === "highlighted") {
60772
- this._nodeStates.set(node, fallback);
60773
- toUpdate.push(node);
60769
+ if (nodes === "all") {
60770
+ for (const [node, state] of this._nodeStates.entries()) {
60771
+ if (state === "highlighted") {
60772
+ this._nodeStates.set(node, fallback);
60773
+ toUpdate.push(node);
60774
+ }
60775
+ }
60776
+ } else {
60777
+ for (const node of nodes) {
60778
+ const state = this._nodeStates.get(node);
60779
+ if (state === "highlighted") {
60780
+ this._nodeStates.set(node, fallback);
60781
+ toUpdate.push(node);
60782
+ }
60774
60783
  }
60775
60784
  }
60776
60785
  if (toUpdate.length > 0) {