diff options
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/engine.vim | 4 | ||||
-rw-r--r-- | autoload/ale/events.vim | 2 | ||||
-rw-r--r-- | autoload/ale/toggle.vim | 2 | ||||
-rw-r--r-- | autoload/ale/virtualtext.vim | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/autoload/ale/engine.vim b/autoload/ale/engine.vim index 97c46656..150bbc82 100644 --- a/autoload/ale/engine.vim +++ b/autoload/ale/engine.vim @@ -203,7 +203,7 @@ function! ale#engine#SetResults(buffer, loclist) abort call ale#highlight#SetHighlights(a:buffer, a:loclist) endif - if g:ale_virtualtext_cursor == 2 + if g:ale_virtualtext_cursor is# 'all' || g:ale_virtualtext_cursor == 2 call ale#virtualtext#SetTexts(a:buffer, a:loclist) endif @@ -214,7 +214,7 @@ function! ale#engine#SetResults(buffer, loclist) abort call ale#cursor#EchoCursorWarning() endif - if g:ale_virtualtext_cursor == 1 + if g:ale_virtualtext_cursor is# 'current' || g:ale_virtualtext_cursor == 1 " Try and show the warning now. " This will only do something meaningful if we're in normal mode. call ale#virtualtext#ShowCursorWarning() diff --git a/autoload/ale/events.vim b/autoload/ale/events.vim index 4efb8a3b..eec24f46 100644 --- a/autoload/ale/events.vim +++ b/autoload/ale/events.vim @@ -139,7 +139,7 @@ function! ale#events#Init() abort autocmd InsertLeave * if exists('*ale#engine#Cleanup') | call ale#cursor#EchoCursorWarning() | endif endif - if g:ale_virtualtext_cursor == 1 + if g:ale_virtualtext_cursor is# 'current' || g:ale_virtualtext_cursor is# 1 || g:ale_virtualtext_cursor is# '1' autocmd CursorMoved,CursorHold * if exists('*ale#engine#Cleanup') | call ale#virtualtext#ShowCursorWarningWithDelay() | endif " Look for a warning to echo as soon as we leave Insert mode. " The script's position variable used when moving the cursor will diff --git a/autoload/ale/toggle.vim b/autoload/ale/toggle.vim index 7f8957d4..abc53daa 100644 --- a/autoload/ale/toggle.vim +++ b/autoload/ale/toggle.vim @@ -14,7 +14,7 @@ function! s:DisablePostamble() abort call ale#highlight#UpdateHighlights() endif - if g:ale_virtualtext_cursor == 1 + if g:ale_virtualtext_cursor is# 'current' || g:ale_virtualtext_cursor == 1 call ale#virtualtext#Clear(bufnr('')) endif endfunction diff --git a/autoload/ale/virtualtext.vim b/autoload/ale/virtualtext.vim index 5fade39b..4fb8a31f 100644 --- a/autoload/ale/virtualtext.vim +++ b/autoload/ale/virtualtext.vim @@ -112,7 +112,7 @@ function! ale#virtualtext#GetHlGroup(type, style) abort endfunction function! ale#virtualtext#ShowCursorWarning(...) abort - if g:ale_virtualtext_cursor != 1 + if g:ale_virtualtext_cursor isnot# 'current' && g:ale_virtualtext_cursor != 1 return endif @@ -142,7 +142,7 @@ endfunction function! ale#virtualtext#ShowCursorWarningWithDelay() abort let l:buffer = bufnr('') - if g:ale_virtualtext_cursor != 1 + if g:ale_virtualtext_cursor isnot# 'current' && g:ale_virtualtext_cursor != 1 return endif |