From 9427025e13d75fd83246ec4e9bf8cdc30451f435 Mon Sep 17 00:00:00 2001 From: Anton Shestakov Date: Sun, 8 Jan 2017 10:08:29 +0800 Subject: [PATCH] crecord: add an experimental option for space key to move cursor down 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. We add this an experimental option to experiment with this behavior. --- mercurial/crecord.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mercurial/crecord.py b/mercurial/crecord.py index ccda76e577..6ef0771bcf 100644 --- a/mercurial/crecord.py +++ b/mercurial/crecord.py @@ -1588,6 +1588,8 @@ are you sure you want to review/edit and confirm the selected changes [yn]? return True elif keypressed in [' '] or (test and keypressed in ["TOGGLE"]): self.toggleapply() + if self.ui.configbool('experimental', 'spacemovesdown'): + self.downarrowevent() elif keypressed in ['A']: self.toggleall() elif keypressed in ['e']: