support backspace in interactive mode

This commit is contained in:
Junegunn Choi
2013-05-13 03:10:33 +09:00
parent 811ea63b11
commit cb71847a11

View File

@@ -36,7 +36,6 @@ function! s:do_align(just, fl, ll, fc, lc, pattern, nth, ml, mr, stick_to_left,
let tokens = extend([join(tokens[0:1], '')], tokens[2:-1])
endif
let max_tokens = max([len(tokens), max_tokens])
if a:nth > 0
if len(tokens) < a:nth
continue
@@ -125,6 +124,10 @@ function! easy_align#align(just, ...) range
let ch = nr2char(c)
if c == 3 || c == 27
return
elseif c == '<27>kb'
if len(n) > 0
let n = strpart(n, 0, len(n) - 1)
endif
elseif c == 13
let just = (just + 1) % len(s:just)
elseif c == 45