mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
Handle non-ASCII paths.
This prevents git-ls-files from escaping "unusual" characters in pathnames. When this happened, gitgutter would feed the escaped name back to git-show but git-show would not recognise it. This commit makes git-ls-files use the -z option to output pathnames verbatim. These pathnames also become null terminated so we have to ensure we remove the null terminator too. Closes #562.
This commit is contained in:
@@ -191,6 +191,20 @@ function Test_filename_leading_dash()
|
||||
endfunction
|
||||
|
||||
|
||||
function Test_filename_umlaut()
|
||||
call system('touch -- fixtüre.txt && git add -- fixtüre.txt')
|
||||
edit fixtüre.txt
|
||||
normal ggo*
|
||||
call s:trigger_gitgutter()
|
||||
|
||||
let expected = [
|
||||
\ 'line=1 id=3000 name=GitGutterLineAdded',
|
||||
\ 'line=2 id=3001 name=GitGutterLineAdded'
|
||||
\ ]
|
||||
call assert_equal(expected, s:signs('fixtüre.txt'))
|
||||
endfunction
|
||||
|
||||
|
||||
" FIXME: this test fails when it is the first (or only) test to be run
|
||||
function Test_follow_symlink()
|
||||
let tmp = 'symlink'
|
||||
|
||||
Reference in New Issue
Block a user