motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit 8082606fd0809ad9eed2a59ebb6d7e1352d85b74 (tree)
parent 2dc08dfe354ed5400f5cdb3d5009dcd4024aac8a
Author: Tim Pope <code@tpope.net>
Date:   Sat,  7 Aug 2021 15:49:43 -0400

Fix direct usage of fnameescape()

I plan to lower the minimum Vim version back to 7.0 before shipping 3.4,
which means we can't assume the presence of fnameescape().

Diffstat:
Mautoload/fugitive.vim | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim @@ -2296,7 +2296,7 @@ function! fugitive#BufReadStatus() abort if &bufhidden ==# '' setlocal bufhidden=delete endif - let b:dispatch = '-dir=' . fnameescape(len(s:Tree()) ? s:Tree() : s:Dir()) . ' ' . s:GitShellCmd() . ' fetch --all' + let b:dispatch = '-dir=' . s:fnameescape(len(s:Tree()) ? s:Tree() : s:Dir()) . ' ' . s:GitShellCmd() . ' fetch --all' call fugitive#MapJumps() call s:Map('n', '-', ":<C-U>execute <SID>Do('Toggle',0)<CR>", '<silent>') call s:Map('x', '-', ":<C-U>execute <SID>Do('Toggle',1)<CR>", '<silent>') @@ -2863,7 +2863,7 @@ function! s:RunWait(state, tmp, job, ...) abort call remove(a:tmp, 'echo') endif call writefile(['fugitive: aborting edit due to background operation.'], a:state.file . '.exit') - exe (&splitbelow ? 'botright' : 'topleft') 'silent pedit ++ff=unix' fnameescape(a:state.file) + exe (&splitbelow ? 'botright' : 'topleft') 'silent pedit ++ff=unix' s:fnameescape(a:state.file) let a:state.capture_bufnr = bufnr(a:state.file) call setbufvar(a:state.capture_bufnr, '&modified', 1) let finished = 0 @@ -6673,7 +6673,7 @@ function! fugitive#MapJumps(...) abort if !exists('g:fugitive_no_maps') if exists(':CtrlP') && get(g:, 'ctrl_p_map') =~? '^<c-p>$' - nnoremap <buffer> <silent> <C-P> :<C-U>execute line('.') == 1 ? 'CtrlP ' . fnameescape(<SID>Tree()) : <SID>PreviousItem(v:count1)<CR> + nnoremap <buffer> <silent> <C-P> :<C-U>execute line('.') == 1 ? 'CtrlP ' . s:fnameescape(<SID>Tree()) : <SID>PreviousItem(v:count1)<CR> else nnoremap <buffer> <silent> <C-P> :<C-U>execute <SID>PreviousItem(v:count1)<CR> endif