-
Notifications
You must be signed in to change notification settings - Fork 750
feat: close search dialog with ctrl+f #1807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -83,7 +83,12 @@ function setupHistoryNavigation() { | |||||||||||||
| // Search input history navigation | ||||||||||||||
| if ($searchInput.el) { | ||||||||||||||
| $searchInput.el.addEventListener("keydown", (e) => { | ||||||||||||||
| if (e.key === "ArrowUp") { | ||||||||||||||
| if ((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "f") { | ||||||||||||||
| e.preventDefault(); | ||||||||||||||
| const { editor, activeFile } = editorManager; | ||||||||||||||
| editor.focus(); | ||||||||||||||
| toggleSearch(); | ||||||||||||||
|
Comment on lines
+88
to
+90
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Calling
This is likely not the desired behavior when the user presses Additionally,
Suggested change
|
||||||||||||||
| } else if (e.key === "ArrowUp") { | ||||||||||||||
| e.preventDefault(); | ||||||||||||||
| const newValue = searchHistory.navigateSearchUp($searchInput.el.value); | ||||||||||||||
| $searchInput.el.value = newValue; | ||||||||||||||
|
|
||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
activeFilevariable is destructured but never used in this code block. Consider removing it to keep the code clean.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI