mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-14 06:13:51 -05:00
Use <nowait> for - maps
Closes https://github.com/tpope/vim-fugitive/issues/1076
This commit is contained in:
@@ -1164,12 +1164,13 @@ function! fugitive#BufReadStatus() abort
|
|||||||
setlocal bufhidden=delete
|
setlocal bufhidden=delete
|
||||||
endif
|
endif
|
||||||
call fugitive#MapJumps()
|
call fugitive#MapJumps()
|
||||||
|
let nowait = v:version >= 704 ? '<nowait>' : ''
|
||||||
nunmap <buffer> P
|
nunmap <buffer> P
|
||||||
nunmap <buffer> ~
|
nunmap <buffer> ~
|
||||||
nnoremap <buffer> <silent> <C-N> :<C-U>execute <SID>StageNext(v:count1)<CR>
|
nnoremap <buffer> <silent> <C-N> :<C-U>execute <SID>StageNext(v:count1)<CR>
|
||||||
nnoremap <buffer> <silent> <C-P> :<C-U>execute <SID>StagePrevious(v:count1)<CR>
|
nnoremap <buffer> <silent> <C-P> :<C-U>execute <SID>StagePrevious(v:count1)<CR>
|
||||||
nnoremap <buffer> <silent> - :<C-U>silent execute <SID>StageToggle(line('.'),line('.')+v:count1-1)<CR>
|
exe "nnoremap <buffer> <silent>" nowait "- :<C-U>silent execute <SID>StageToggle(line('.'),line('.')+v:count1-1)<CR>"
|
||||||
xnoremap <buffer> <silent> - :<C-U>silent execute <SID>StageToggle(line("'<"),line("'>"))<CR>
|
exe "xnoremap <buffer> <silent>" nowait "- :<C-U>silent execute <SID>StageToggle(line(\"'<\"),line(\"'>\"))<CR>"
|
||||||
nnoremap <buffer> <silent> a :<C-U>let b:fugitive_display_format += 1<Bar>exe fugitive#BufReadStatus()<CR>
|
nnoremap <buffer> <silent> a :<C-U>let b:fugitive_display_format += 1<Bar>exe fugitive#BufReadStatus()<CR>
|
||||||
nnoremap <buffer> <silent> i :<C-U>let b:fugitive_display_format -= 1<Bar>exe fugitive#BufReadStatus()<CR>
|
nnoremap <buffer> <silent> i :<C-U>let b:fugitive_display_format -= 1<Bar>exe fugitive#BufReadStatus()<CR>
|
||||||
nnoremap <buffer> <silent> C :<C-U>Gcommit<CR>:echohl WarningMsg<Bar>echo ':Gstatus C is deprecated in favor of cc'<Bar>echohl NONE<CR>
|
nnoremap <buffer> <silent> C :<C-U>Gcommit<CR>:echohl WarningMsg<Bar>echo ':Gstatus C is deprecated in favor of cc'<Bar>echohl NONE<CR>
|
||||||
@@ -3321,6 +3322,7 @@ function! fugitive#MapJumps(...) abort
|
|||||||
nnoremap <buffer> <silent> <CR> :<C-U>exe <SID>GF("edit")<CR>
|
nnoremap <buffer> <silent> <CR> :<C-U>exe <SID>GF("edit")<CR>
|
||||||
endif
|
endif
|
||||||
if !&modifiable
|
if !&modifiable
|
||||||
|
let nowait = v:version >= 704 ? '<nowait>' : ''
|
||||||
if get(b:, 'fugitive_type', '') ==# 'blob'
|
if get(b:, 'fugitive_type', '') ==# 'blob'
|
||||||
nnoremap <buffer> <silent> o :<C-U>.,.+1Gblame<CR>
|
nnoremap <buffer> <silent> o :<C-U>.,.+1Gblame<CR>
|
||||||
nnoremap <buffer> <silent> S :<C-U>vertical .,.+1Gblame<CR>
|
nnoremap <buffer> <silent> S :<C-U>vertical .,.+1Gblame<CR>
|
||||||
@@ -3332,7 +3334,7 @@ function! fugitive#MapJumps(...) abort
|
|||||||
nnoremap <buffer> <silent> O :<C-U>exe <SID>GF("tabedit")<CR>
|
nnoremap <buffer> <silent> O :<C-U>exe <SID>GF("tabedit")<CR>
|
||||||
nnoremap <buffer> <silent> p :<C-U>exe <SID>GF("pedit")<CR>
|
nnoremap <buffer> <silent> p :<C-U>exe <SID>GF("pedit")<CR>
|
||||||
endif
|
endif
|
||||||
nnoremap <buffer> <silent> - :<C-U>exe 'Gedit ' . <SID>fnameescape(<SID>NavigateUp(v:count1))<Bar> if getline(1) =~# '^tree \x\{40\}$' && empty(getline(2))<Bar>call search('^'.escape(expand('#:t'),'.*[]~\').'/\=$','wc')<Bar>endif<CR>
|
exe "nnoremap <buffer> <silent>" nowait "- :<C-U>exe 'Gedit ' . <SID>fnameescape(<SID>NavigateUp(v:count1))<Bar> if getline(1) =~# '^tree \x\{40\}$' && empty(getline(2))<Bar>call search('^'.escape(expand('#:t'),'.*[]~\').'/\=$','wc')<Bar>endif<CR>"
|
||||||
nnoremap <buffer> <silent> P :<C-U>exe 'Gedit ' . <SID>fnameescape(<SID>ContainingCommit().'^'.v:count1.<SID>Relative(':'))<CR>
|
nnoremap <buffer> <silent> P :<C-U>exe 'Gedit ' . <SID>fnameescape(<SID>ContainingCommit().'^'.v:count1.<SID>Relative(':'))<CR>
|
||||||
nnoremap <buffer> <silent> ~ :<C-U>exe 'Gedit ' . <SID>fnameescape(<SID>ContainingCommit().'~'.v:count1.<SID>Relative(':'))<CR>
|
nnoremap <buffer> <silent> ~ :<C-U>exe 'Gedit ' . <SID>fnameescape(<SID>ContainingCommit().'~'.v:count1.<SID>Relative(':'))<CR>
|
||||||
nnoremap <buffer> <silent> C :<C-U>exe 'Gedit ' . <SID>fnameescape(<SID>ContainingCommit())<CR>
|
nnoremap <buffer> <silent> C :<C-U>exe 'Gedit ' . <SID>fnameescape(<SID>ContainingCommit())<CR>
|
||||||
|
|||||||
Reference in New Issue
Block a user