mirror of
https://github.com/junegunn/vim-easy-align.git
synced 2025-11-10 02:43:49 -05:00
Fix regression: lines with indentation
This commit is contained in:
@@ -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 = []
|
||||
|
||||
@@ -374,3 +374,8 @@ static std::map<std::string, float>* scores = pointer;
|
||||
|
||||
```
|
||||
|
||||
Paul McCartney 1942
|
||||
George Harrison 1943
|
||||
Ringo Starr 1940
|
||||
Pete Best 1941
|
||||
|
||||
|
||||
@@ -117,3 +117,8 @@ static std::map<std::string, float>* scores = pointer;
|
||||
|
||||
```
|
||||
|
||||
Paul McCartney 1942
|
||||
George Harrison 1943
|
||||
Ringo Starr 1940
|
||||
Pete Best 1941
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
4Gvipjyvip
|
||||
4Gvipjyvip
|
||||
|
||||
Reference in New Issue
Block a user