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.
|
@@ -76,7 +76,7 @@ export declare class Vim {
|
|
|
76
76
|
* @param nodes - The nodes to remove the highlight from.
|
|
77
77
|
* @param fallback - The state to revert the nodes to.
|
|
78
78
|
*/
|
|
79
|
-
removeHighlight(nodes: number[], fallback: NodeState): void;
|
|
79
|
+
removeHighlight(nodes: number[] | 'all', fallback: NodeState): void;
|
|
80
80
|
/**
|
|
81
81
|
* Retrieves the bounding box of the given nodes.
|
|
82
82
|
* @param nodes - The nodes to get the bounding box for.
|
package/dist/vim-web.iife.js
CHANGED
|
@@ -60782,11 +60782,20 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
60782
60782
|
*/
|
|
60783
60783
|
removeHighlight(nodes, fallback) {
|
|
60784
60784
|
const toUpdate = [];
|
|
60785
|
-
|
|
60786
|
-
const state
|
|
60787
|
-
|
|
60788
|
-
|
|
60789
|
-
|
|
60785
|
+
if (nodes === "all") {
|
|
60786
|
+
for (const [node, state] of this._nodeStates.entries()) {
|
|
60787
|
+
if (state === "highlighted") {
|
|
60788
|
+
this._nodeStates.set(node, fallback);
|
|
60789
|
+
toUpdate.push(node);
|
|
60790
|
+
}
|
|
60791
|
+
}
|
|
60792
|
+
} else {
|
|
60793
|
+
for (const node of nodes) {
|
|
60794
|
+
const state = this._nodeStates.get(node);
|
|
60795
|
+
if (state === "highlighted") {
|
|
60796
|
+
this._nodeStates.set(node, fallback);
|
|
60797
|
+
toUpdate.push(node);
|
|
60798
|
+
}
|
|
60790
60799
|
}
|
|
60791
60800
|
}
|
|
60792
60801
|
if (toUpdate.length > 0) {
|