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 = []

View File

@@ -374,3 +374,8 @@ static std::map<std::string, float>* scores = pointer;
```
Paul McCartney 1942
George Harrison 1943
Ringo Starr 1940
Pete Best 1941

View File

@@ -117,3 +117,8 @@ static std::map<std::string, float>* scores = pointer;
```
Paul McCartney 1942
George Harrison 1943
Ringo Starr 1940
Pete Best 1941

View File

@@ -1 +1 @@
4Gvipjyvip
4Gvipjyvip