crecord: enable search hotkeys (issue6834)
The keys I chose here should be similar to less/vim keybindings, which
should fit the overall keybinding theme of crecord.
--- a/mercurial/crecord.py Wed Feb 14 22:54:21 2024 -0500
+++ b/mercurial/crecord.py Wed Feb 14 22:55:11 2024 -0500
@@ -1665,6 +1665,9 @@
a : toggle all selections
c : confirm selected changes
r : review/edit and confirm selected changes
+ / : regex search for code or filename
+ n : next search result for code or filename
+ N : previous search result for code or filename
q : quit without confirming (no changes will be made)
? : help (what you're currently reading)"""
)
@@ -2013,6 +2016,12 @@
self.togglefolded(foldparent=True)
elif keypressed in ["m"]:
self.commitMessageWindow()
+ elif keypressed in ["/"]:
+ self.handlesearch()
+ elif keypressed in ["n"]:
+ self.handlenextsearch()
+ elif keypressed in ["N"]:
+ self.handleprevsearch()
elif keypressed in ["g", "KEY_HOME"]:
self.handlefirstlineevent()
elif keypressed in ["G", "KEY_END"]: