mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
Handle filenames containing equals signs.
This commit is contained in:
@@ -77,7 +77,7 @@ function! gitgutter#sign#find_current_signs()
|
||||
silent execute "sign place buffer=" . bufnr
|
||||
redir END
|
||||
|
||||
for sign_line in filter(split(signs, '\n'), 'v:val =~# "="')
|
||||
for sign_line in filter(split(signs, '\n')[2:], 'v:val =~# "="')
|
||||
" Typical sign line: line=88 id=1234 name=GitGutterLineAdded
|
||||
" We assume splitting is faster than a regexp.
|
||||
let components = split(sign_line)
|
||||
|
||||
0
test/=fixture=.txt
Normal file
0
test/=fixture=.txt
Normal file
5
test/filenameWithEquals.expected
Normal file
5
test/filenameWithEquals.expected
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
--- Signs ---
|
||||
Signs for =fixture=.txt:
|
||||
line=1 id=3000 name=GitGutterLineAdded
|
||||
line=2 id=3001 name=GitGutterLineAdded
|
||||
12
test/testFilenameWithEquals.vim
Normal file
12
test/testFilenameWithEquals.vim
Normal file
@@ -0,0 +1,12 @@
|
||||
source helper.vim
|
||||
|
||||
edit =fixture=.txt
|
||||
normal ggo*
|
||||
try
|
||||
write
|
||||
write
|
||||
call DumpSigns('filenameWithEquals')
|
||||
finally
|
||||
call system('git reset HEAD =fixture=.txt')
|
||||
call system('git checkout =fixture=.txt')
|
||||
endtry
|
||||
Reference in New Issue
Block a user