On 01/08/2017 03:19 AM, Anton Shestakov wrote:
# HG changeset patch # User Anton Shestakov <a...@dwimlabs.net> # Date 1483841309 -28800 # Sun Jan 08 10:08:29 2017 +0800 # Node ID 1afa1ffe6984bfe0027336ce0c83486e82ba2b50 # Parent cfd14b0508ddf8edf156d202e2c5d07b259c2f46 crecord: make an option for space key to move cursor down (issue5159) (RFC) I really want to have an option of toggling a selection on a line and also moving cursor down as a single keystroke. It also kinda makes sense for space key to do this, because some other curses UIs in the wild do this (e.g. various file managers, htop). So I got an idea to make a config option that defaults to False for compatibility, but allows making crecord UI a lot more useful for people with big hunks. What do you people think? And in what section should I put the config?
What about using a modifier key for that ? eg: shift space select and move forward.
diff --git a/mercurial/crecord.py b/mercurial/crecord.py --- a/mercurial/crecord.py +++ b/mercurial/crecord.py @@ -1588,6 +1588,8 @@ are you sure you want to review/edit and return True elif keypressed in [' '] or (test and keypressed in ["TOGGLE"]): self.toggleapply() + if self.ui.configbool('crecord', 'spacemovesdown'): + self.downarrowevent() elif keypressed in ['A']: self.toggleall() elif keypressed in ['e']: _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
-- Pierre-Yves David _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel