fix non-interactive EasyAlign to take negative field #

This commit is contained in:
Junegunn Choi
2013-05-13 03:21:52 +09:00
parent cb71847a11
commit 5c870f60d9

View File

@@ -153,7 +153,7 @@ function! easy_align#align(just, ...) range
endif
endwhile
elseif a:0 == 1
let tokens = matchlist(a:1, '^\([1-9][0-9]*\|\*\)\?\(.\)$')
let tokens = matchlist(a:1, '^\(-\?[1-9][0-9]*\|-\|\*\)\?\(.\)$')
if empty(tokens)
echo "Invalid arguments: ". a:1
return