# HG changeset patch # User Jordi GutiƩrrez Hermoso # Date 2024-02-15 03:55:11 # Node ID 0e063a9b764abae9d6b9d481b48286a7316051eb # Parent d0f6b96d1fb8dbfa6a1d013e95140d6b73c025d3 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. diff --git a/mercurial/crecord.py b/mercurial/crecord.py --- a/mercurial/crecord.py +++ b/mercurial/crecord.py @@ -1665,6 +1665,9 @@ smaller changesets. the following are va 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 @@ are you sure you want to review/edit and 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"]: