diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index a3f45ca..f714a39 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -4938,9 +4938,9 @@ function! fugitive#MapJumps(...) abort nnoremap cz :G stash nnoremap cz :G stash - nnoremap cza :exe EchoExec(['stash', 'apply', '--quiet', 'stash@{' . v:count . '}']) + nnoremap cza :exe EchoExec(['stash', 'apply', '--quiet', '--index', 'stash@{' . v:count . '}']) nnoremap czA :exe EchoExec(['stash', 'apply', '--quiet', 'stash@{' . v:count . '}']) - nnoremap czp :exe EchoExec(['stash', 'pop', '--quiet', 'stash@{' . v:count . '}']) + nnoremap czp :exe EchoExec(['stash', 'pop', '--quiet', '--index', 'stash@{' . v:count . '}']) nnoremap czP :exe EchoExec(['stash', 'pop', '--quiet', 'stash@{' . v:count . '}']) nnoremap czv :exe 'Gedit' fugitive#RevParse('stash@{' . v:count . '}') nnoremap czw :exe EchoExec(['stash', '--keep-index'] + (v:count > 1 ? ['--all'] : v:count ? ['--include-untracked'] : [])) diff --git a/doc/fugitive.txt b/doc/fugitive.txt index 92a6e71..15c56cf 100644 --- a/doc/fugitive.txt +++ b/doc/fugitive.txt @@ -421,9 +421,15 @@ czz Push stash. Pass a [count] of 1 to add czw Push stash of worktree. Like `czz` with `--include-index`. -cza Apply topmost stash, or stash@{count}. +czA Apply topmost stash, or stash@{count}. -czp Pop topmost stash, or stash@{count}. +cza Apply topmost stash, or stash@{count}, preserving the + index. + +czP Pop topmost stash, or stash@{count}. + +czp Pop topmost stash, or stash@{count}, preserving the + index. cz Populate command line with ":G stash ".