Skip to content

Commit

Permalink
feat: highlight text in workspace search on open and add backwards nav
Browse files Browse the repository at this point in the history
  • Loading branch information
riknoll committed Aug 6, 2024
1 parent a47f58b commit adae5ad
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/workspace-search/src/workspace_search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,11 @@ export class WorkspaceSearch implements Blockly.IPositionable {
this.close();
} else if (e.key === 'Enter') {
if (this.searchOnInput) {
this.next();
if (e.shiftKey) {
this.previous();
} else {
this.next();
}
} else {
if (!this.inputElement) return;
const inputValue = this.inputElement.value.trim();
Expand Down Expand Up @@ -440,6 +444,7 @@ export class WorkspaceSearch implements Blockly.IPositionable {
open() {
this.setVisible(true);
this.inputElement?.focus();
this.inputElement?.select();
if (this.searchText) {
this.searchAndHighlight(this.searchText);
}
Expand Down

0 comments on commit adae5ad

Please sign in to comment.