Skip to content

Commit 0eb13cd

Browse files
authored
feat: highlight text in workspace search on open and add backwards nav (#2440)
1 parent 7642eec commit 0eb13cd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

plugins/workspace-search/src/workspace_search.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,11 @@ export class WorkspaceSearch implements Blockly.IPositionable {
362362
this.close();
363363
} else if (e.key === 'Enter') {
364364
if (this.searchOnInput) {
365-
this.next();
365+
if (e.shiftKey) {
366+
this.previous();
367+
} else {
368+
this.next();
369+
}
366370
} else {
367371
if (!this.inputElement) return;
368372
const inputValue = this.inputElement.value.trim();
@@ -440,6 +444,7 @@ export class WorkspaceSearch implements Blockly.IPositionable {
440444
open() {
441445
this.setVisible(true);
442446
this.inputElement?.focus();
447+
this.inputElement?.select();
443448
if (this.searchText) {
444449
this.searchAndHighlight(this.searchText);
445450
}

0 commit comments

Comments
 (0)