summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorMagnus Groß <21310755+vimpostor@users.noreply.github.com>2022-09-06 12:35:13 +0200
committerGitHub <noreply@github.com>2022-09-06 19:35:13 +0900
commit4943b7d39f75cb19e5be6c0cab94132655f07f07 (patch)
tree91d5eaeaaf43e1fc77d628b7b2cccc35e06082d2 /autoload
parent6996d1c14dd109cc5112d1a60c86683e5308d14c (diff)
downloadale-4943b7d39f75cb19e5be6c0cab94132655f07f07.zip
Fix virtual text for vim 8.2 (#4291)
Regression was introduced in d93bc2baf7532818e83bf2fac61fcd591beb6151 The problem was that we did not handle the edge case where there is no last popup to close, which caused old vim versions to enter code by accident that was only supposed to be run by vim 9. We fix this by guarding the if condition for vim 9. Fixes #4290
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/virtualtext.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/autoload/ale/virtualtext.vim b/autoload/ale/virtualtext.vim
index f0753dfe..e4bf5d25 100644
--- a/autoload/ale/virtualtext.vim
+++ b/autoload/ale/virtualtext.vim
@@ -39,7 +39,7 @@ function! ale#virtualtext#Clear() abort
call prop_remove({'type': 'ale'})
call popup_close(s:last_virt)
let s:last_virt = -1
- elseif s:last_virt != 1
+ elseif !s:emulate_virt && s:last_virt != 1
call prop_remove({'id': s:last_virt})
let s:last_virt = 1
endif