From b5f23e986747a6f4b1dc1196d2a5bd3dc7c8c2b6 Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Mon, 27 Jun 2016 10:55:26 +0100 Subject: [PATCH] Use known shell for hunk staging, previewing, undoing. Forgot to do this in 377c71d. Closes #352. --- autoload/gitgutter.vim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/autoload/gitgutter.vim b/autoload/gitgutter.vim index 24a6c74..3b1770a 100644 --- a/autoload/gitgutter.vim +++ b/autoload/gitgutter.vim @@ -170,6 +170,7 @@ endfunction " Hunks {{{ function! gitgutter#stage_hunk() abort + call gitgutter#utility#use_known_shell() if gitgutter#utility#is_active() " Ensure the working copy of the file is up to date. " It doesn't make sense to stage a hunk otherwise. @@ -189,9 +190,11 @@ function! gitgutter#stage_hunk() abort silent! call repeat#set("\GitGutterStageHunk", -1) endif + call gitgutter#utility#restore_shell() endfunction function! gitgutter#undo_hunk() abort + call gitgutter#utility#use_known_shell() if gitgutter#utility#is_active() " Ensure the working copy of the file is up to date. " It doesn't make sense to stage a hunk otherwise. @@ -214,9 +217,11 @@ function! gitgutter#undo_hunk() abort silent! call repeat#set("\GitGutterUndoHunk", -1) endif + call gitgutter#utility#restore_shell() endfunction function! gitgutter#preview_hunk() abort + call gitgutter#utility#use_known_shell() if gitgutter#utility#is_active() " Ensure the working copy of the file is up to date. " It doesn't make sense to stage a hunk otherwise. @@ -242,6 +247,7 @@ function! gitgutter#preview_hunk() abort wincmd p endif endif + call gitgutter#utility#restore_shell() endfunction " }}}