Mercurial > hg-stable
comparison mercurial/crecord.py @ 51389:0e063a9b764a
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.
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Wed, 14 Feb 2024 22:55:11 -0500 |
parents | d0f6b96d1fb8 |
children | 89cd0dd41e4d |
comparison
equal
deleted
inserted
replaced
51388:d0f6b96d1fb8 | 51389:0e063a9b764a |
---|---|
1663 m : edit / resume editing the commit message | 1663 m : edit / resume editing the commit message |
1664 e : edit the currently selected hunk | 1664 e : edit the currently selected hunk |
1665 a : toggle all selections | 1665 a : toggle all selections |
1666 c : confirm selected changes | 1666 c : confirm selected changes |
1667 r : review/edit and confirm selected changes | 1667 r : review/edit and confirm selected changes |
1668 / : regex search for code or filename | |
1669 n : next search result for code or filename | |
1670 N : previous search result for code or filename | |
1668 q : quit without confirming (no changes will be made) | 1671 q : quit without confirming (no changes will be made) |
1669 ? : help (what you're currently reading)""" | 1672 ? : help (what you're currently reading)""" |
1670 ) | 1673 ) |
1671 | 1674 |
1672 helpwin = curses.newwin(self.yscreensize, 0, 0, 0) | 1675 helpwin = curses.newwin(self.yscreensize, 0, 0, 0) |
2011 self.togglefolded() | 2014 self.togglefolded() |
2012 elif keypressed in ["F"]: | 2015 elif keypressed in ["F"]: |
2013 self.togglefolded(foldparent=True) | 2016 self.togglefolded(foldparent=True) |
2014 elif keypressed in ["m"]: | 2017 elif keypressed in ["m"]: |
2015 self.commitMessageWindow() | 2018 self.commitMessageWindow() |
2019 elif keypressed in ["/"]: | |
2020 self.handlesearch() | |
2021 elif keypressed in ["n"]: | |
2022 self.handlenextsearch() | |
2023 elif keypressed in ["N"]: | |
2024 self.handleprevsearch() | |
2016 elif keypressed in ["g", "KEY_HOME"]: | 2025 elif keypressed in ["g", "KEY_HOME"]: |
2017 self.handlefirstlineevent() | 2026 self.handlefirstlineevent() |
2018 elif keypressed in ["G", "KEY_END"]: | 2027 elif keypressed in ["G", "KEY_END"]: |
2019 self.handlelastlineevent() | 2028 self.handlelastlineevent() |
2020 elif keypressed in ["?"]: | 2029 elif keypressed in ["?"]: |