mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-09 20:13:46 -05:00
Use known shell for hunk staging, previewing, undoing.
Forgot to do this in 377c71d.
Closes #352.
This commit is contained in:
@@ -170,6 +170,7 @@ endfunction
|
|||||||
" Hunks {{{
|
" Hunks {{{
|
||||||
|
|
||||||
function! gitgutter#stage_hunk() abort
|
function! gitgutter#stage_hunk() abort
|
||||||
|
call gitgutter#utility#use_known_shell()
|
||||||
if gitgutter#utility#is_active()
|
if gitgutter#utility#is_active()
|
||||||
" Ensure the working copy of the file is up to date.
|
" Ensure the working copy of the file is up to date.
|
||||||
" It doesn't make sense to stage a hunk otherwise.
|
" It doesn't make sense to stage a hunk otherwise.
|
||||||
@@ -189,9 +190,11 @@ function! gitgutter#stage_hunk() abort
|
|||||||
|
|
||||||
silent! call repeat#set("\<Plug>GitGutterStageHunk", -1)<CR>
|
silent! call repeat#set("\<Plug>GitGutterStageHunk", -1)<CR>
|
||||||
endif
|
endif
|
||||||
|
call gitgutter#utility#restore_shell()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! gitgutter#undo_hunk() abort
|
function! gitgutter#undo_hunk() abort
|
||||||
|
call gitgutter#utility#use_known_shell()
|
||||||
if gitgutter#utility#is_active()
|
if gitgutter#utility#is_active()
|
||||||
" Ensure the working copy of the file is up to date.
|
" Ensure the working copy of the file is up to date.
|
||||||
" It doesn't make sense to stage a hunk otherwise.
|
" It doesn't make sense to stage a hunk otherwise.
|
||||||
@@ -214,9 +217,11 @@ function! gitgutter#undo_hunk() abort
|
|||||||
|
|
||||||
silent! call repeat#set("\<Plug>GitGutterUndoHunk", -1)<CR>
|
silent! call repeat#set("\<Plug>GitGutterUndoHunk", -1)<CR>
|
||||||
endif
|
endif
|
||||||
|
call gitgutter#utility#restore_shell()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! gitgutter#preview_hunk() abort
|
function! gitgutter#preview_hunk() abort
|
||||||
|
call gitgutter#utility#use_known_shell()
|
||||||
if gitgutter#utility#is_active()
|
if gitgutter#utility#is_active()
|
||||||
" Ensure the working copy of the file is up to date.
|
" Ensure the working copy of the file is up to date.
|
||||||
" It doesn't make sense to stage a hunk otherwise.
|
" It doesn't make sense to stage a hunk otherwise.
|
||||||
@@ -242,6 +247,7 @@ function! gitgutter#preview_hunk() abort
|
|||||||
wincmd p
|
wincmd p
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
call gitgutter#utility#restore_shell()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" }}}
|
" }}}
|
||||||
|
|||||||
Reference in New Issue
Block a user