Repository navigation
Conversation
Fixes firefox-devtools#6412. This uses @codemirror/search to add a find bar to the editor views. The find bar opens with Ctrl/Cmd+F while the editor has focus. The assembly view now shares the source view's code viewer extension, which also makes it focusable. Without focus, the search keybinding wouldn't reach it.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6413 +/- ##
=======================================
Coverage 84.78% 84.78%
=======================================
Files 358 358
Lines 38946 38946
Branches 11019 11033 +14
=======================================
Hits 33022 33022
Misses 5488 5488
Partials 436 436 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
fatadel
left a comment
There was a problem hiding this comment.
Thanks for the PR! I left one comment below. In addition, I think we also need to handle better the Esc key behavior. Currently, it closes the whole panel while searching in the full-screen mode.
| // the editor has focus. The replace controls are hidden because the editor | ||
| // is read-only. | ||
| search({ top: true }), | ||
| keymap.of(searchKeymap), |
There was a problem hiding this comment.
searchKeymap binds more than find. It also includes Mod-Alt-G (gotoLine), Mod-D (selectNextOccurrence) and Mod-Shift-L (selectSelectionMatches).
gotoLine won't work properly because the counting of the line numbers differes.
selectNextOccurrence takes over the browser's bookmark shortcut.
Would it be better if we bind only the find-related entries?
Main | Deploy preview
Fixes #6412.
This uses @codemirror/search to add a find bar to the editor views. The find bar opens with Ctrl/Cmd+F while the editor has focus.
The assembly view now shares the source view's code viewer extension, which also makes it focusable. Without focus, the search keybinding wouldn't reach it.