#816 do not modify previewpopup when it does not exist

This commit is contained in:
Alexander Courtis
2022-02-19 10:48:36 +11:00
committed by Andy Stewart
parent d845704e9e
commit e433d5ddc1

View File

@@ -466,7 +466,9 @@ function! s:open_hunk_preview_window()
endif endif
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 " Specifying where to open the preview window can lead to the cursor going
" to an unexpected window when the preview window is closed (#769). " to an unexpected window when the preview window is closed (#769).
@@ -487,7 +489,9 @@ function! s:open_hunk_preview_window()
nnoremap <buffer> <silent> <Esc> :<C-U>wincmd p<Bar>pclose<CR> nnoremap <buffer> <silent> <Esc> :<C-U>wincmd p<Bar>pclose<CR>
endif endif
let &previewpopup=previewpopup if exists('&previewpopup')
let &previewpopup=previewpopup
endif
endfunction endfunction