mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
Fix typo in utility#escape().
This commit is contained in:
@@ -61,14 +61,14 @@ function! utility#file_relative_to_repo_root()
|
||||
return substitute(s:file, repo_root_for_file, '', '')
|
||||
endfunction
|
||||
|
||||
" https://github.com/tpope/vim-dispatch/blob/9cdd05a87f8a47120335be03dfcd8358544221cd/autoload/dispatch/windows.vim#L8-L17
|
||||
" https://github.com/tpope/vim-dispatch/blob/bc415acd37187cbd6b417d92af40ba2c4b3b8775/autoload/dispatch/windows.vim#L8-L17
|
||||
function! utility#escape(str)
|
||||
if &shellxquote ==# '"'
|
||||
return '"' . substitute(a:str, '"', '""', 'g') . '"'
|
||||
else
|
||||
let esc = exists('+shellxescape') ? &shellxescape : '"&|<>()@^'
|
||||
return &shellquote .
|
||||
\ substitute(a:str, '['.esc.']', '&', 'g') .
|
||||
\ substitute(a:str, '['.esc.']', '^&', 'g') .
|
||||
\ get({'(': ')', '"(': ')"'}, &shellquote, &shellquote)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
Reference in New Issue
Block a user