File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -22,17 +22,13 @@ export default class Highlight implements Action {
2222 }
2323
2424 if ( targets . length === 0 ) {
25- // Special case to clear highlights for the active editor when user says
25+ // Special case to clear highlights for all editors when user says
2626 // "highlight nothing"
27- const { activeTextEditor } = ide ( ) ;
28-
29- if ( activeTextEditor == null ) {
30- throw Error (
31- "The `highlight nothing` command requires an active text editor" ,
32- ) ;
33- }
34-
35- await ide ( ) . setHighlightRanges ( highlightId , activeTextEditor , [ ] ) ;
27+ await Promise . all (
28+ ide ( ) . visibleTextEditors . map ( ( editor ) =>
29+ ide ( ) . setHighlightRanges ( highlightId , editor , [ ] ) ,
30+ ) ,
31+ ) ;
3632 } else {
3733 await runOnTargetsForEachEditor ( targets , ( editor , targets ) =>
3834 ide ( ) . setHighlightRanges (
You can’t perform that action at this time.
0 commit comments