mirror of
https://github.com/dense-analysis/ale
synced 2025-01-04 05:02:05 +00:00
Don't exit visual mode on floating preview close (#3689)
This commit is contained in:
parent
686c8c5e0a
commit
1cd0c0c33b
@ -113,6 +113,9 @@ function! s:Create(options) abort
|
||||
endfunction
|
||||
|
||||
function! s:Close() abort
|
||||
let l:mode = mode()
|
||||
let l:restore_visual = l:mode is# 'v' || l:mode is# 'V' || l:mode is# "\<C-V>"
|
||||
|
||||
if !exists('w:preview')
|
||||
return
|
||||
endif
|
||||
@ -124,4 +127,8 @@ function! s:Close() abort
|
||||
endif
|
||||
|
||||
unlet w:preview
|
||||
|
||||
if l:restore_visual
|
||||
normal! gv
|
||||
endif
|
||||
endfunction
|
||||
|
Loading…
Reference in New Issue
Block a user