Skip to content

Commit

Permalink
feat:use selection text when searching
Browse files Browse the repository at this point in the history
  • Loading branch information
Hufe921 committed Dec 21, 2022
1 parent 172cb6d commit bcdb234
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1071,8 +1071,14 @@ window.onload = function () {
key: KeyMap.F,
ctrl: true,
isGlobal: true,
callback: () => {
callback: (command: Command) => {
const text = command.getRangeText()
searchDom.click()
if (text) {
searchInputDom.value = text
instance.command.executeSearch(text)
setSearchResult()
}
}
},
{
Expand Down

0 comments on commit bcdb234

Please sign in to comment.