Skip to content

Commit

Permalink
airblade#816 do not modify previewpopup when it does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-courtis authored and airblade committed Feb 19, 2022
1 parent d845704 commit e433d5d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions autoload/gitgutter/hunk.vim
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,9 @@ function! s:open_hunk_preview_window()
endif
endif

let [previewpopup, &previewpopup] = [&previewpopup, '']
if exists('&previewpopup')
let [previewpopup, &previewpopup] = [&previewpopup, '']
endif

" Specifying where to open the preview window can lead to the cursor going
" to an unexpected window when the preview window is closed (#769).
Expand All @@ -487,7 +489,9 @@ function! s:open_hunk_preview_window()
nnoremap <buffer> <silent> <Esc> :<C-U>wincmd p<Bar>pclose<CR>
endif

let &previewpopup=previewpopup
if exists('&previewpopup')
let &previewpopup=previewpopup
endif
endfunction


Expand Down

0 comments on commit e433d5d

Please sign in to comment.