Left arrow key will also set left_margin to zero

- Right arrow key will set left_margin to one
- Up and Down arrow will clear the values of stick_to_left and left_margin
This commit is contained in:
Junegunn Choi
2013-09-14 17:30:37 +09:00
parent 11e0623959
commit 40a06e3d36
3 changed files with 18 additions and 13 deletions

View File

@@ -552,8 +552,13 @@ function! s:interactive(modes, sl)
let opts['ig'] = s:shift(vals['ignore_groups'], 1)
elseif c == "\<Left>"
let opts['stl'] = 1
let opts['lm'] = 0
elseif c == "\<Right>"
let opts['stl'] = 0
let opts['lm'] = 1
elseif c == "\<Up>" || c == "\<Down>"
silent! call remove(opts, 'stl')
silent! call remove(opts, 'lm')
elseif ch == "\<C-O>"
let modes = tolower(s:input("Mode sequence: ", get(opts, 'm', mode), a:sl))
if match(modes, '^[lrc]\+\*\{0,2}$') != -1