Fix regression: lines with indentation

This commit is contained in:
Junegunn Choi
2013-08-12 01:47:05 +09:00
parent c4dbfece32
commit 7d031956ab
4 changed files with 18 additions and 1 deletions

View File

@@ -180,6 +180,13 @@ function! s:split_line(line, fc, lc, pattern, stick_to_left, ignore_unmatched, i
call add(delims, '')
endif
" Preserve indentation - merge first two tokens
if len(tokens) > 1 && empty(s:rtrim(tokens[0]))
let tokens[1] = tokens[0] . tokens[1]
call remove(tokens, 0)
call remove(delims, 0)
endif
" Skip comment line
if ignorable && len(tokens) == 1 && a:ignore_unmatched
let tokens = []