diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-07-14 06:39:25 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-07-14 06:39:25 +0000 |
commit | 5ef5bd7c3127f00dca54499b48802bba85953a6a (patch) | |
tree | 4ffadd85dae09280feb6bb6b8792d0297ed59b13 /mode-key.c | |
parent | 7f98193beb9bb6cdc11776478784ad356f32785b (diff) |
Add a "back to indentation" key in copy mode to move the cursor to the first
non-whitespace character. ^ with vi and M-m with emacs key bindings. Another
from Kalle Olavi Niemitalo, thanks.
Diffstat (limited to 'mode-key.c')
-rw-r--r-- | mode-key.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: mode-key.c,v 1.12 2009-05-14 19:36:56 nicm Exp $ */ +/* $Id: mode-key.c,v 1.13 2009-07-14 06:39:10 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -105,8 +105,9 @@ mode_key_lookup_vi(struct mode_key_data *mdata, int key) return (MODEKEYCMD_CHOOSE); return (MODEKEYCMD_COPYSELECTION); case '0': - case '^': return (MODEKEYCMD_STARTOFLINE); + case '^': + return (MODEKEYCMD_BACKTOINDENTATION); case '\033': return (MODEKEYCMD_CLEARSELECTION); case 'j': @@ -160,6 +161,8 @@ mode_key_lookup_emacs(struct mode_key_data *mdata, int key) return (MODEKEYCMD_CHOOSE); case '\001': return (MODEKEYCMD_STARTOFLINE); + case KEYC_ADDESC('m'): + return (MODEKEYCMD_BACKTOINDENTATION); case '\007': return (MODEKEYCMD_CLEARSELECTION); case '\027': |