mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
Get tests to pass in Vim 8.1
This commit is contained in:
@@ -34,26 +34,25 @@ function! ale#balloon#Expr() abort
|
||||
endfunction
|
||||
|
||||
function! ale#balloon#Disable() abort
|
||||
if has('balloon_eval_term')
|
||||
set noballoonevalterm
|
||||
if has('balloon_eval')
|
||||
set noballooneval
|
||||
set balloonexpr=
|
||||
endif
|
||||
|
||||
set noballooneval
|
||||
set balloonexpr=
|
||||
if has('balloon_eval_term')
|
||||
set noballoonevalterm
|
||||
set balloonexpr=
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! ale#balloon#Enable() abort
|
||||
if !has('balloon_eval') && !has('balloon_eval_term')
|
||||
return
|
||||
endif
|
||||
|
||||
if has('balloon_eval')
|
||||
set ballooneval
|
||||
set balloonexpr=ale#balloon#Expr()
|
||||
endif
|
||||
|
||||
if has('balloon_eval_term')
|
||||
set balloonevalterm
|
||||
set balloonexpr=ale#balloon#Expr()
|
||||
endif
|
||||
|
||||
set balloonexpr=ale#balloon#Expr()
|
||||
endfunction
|
||||
|
||||
@@ -52,3 +52,26 @@ function! ale#test#SetFilename(path) abort
|
||||
|
||||
silent! noautocmd execute 'file ' . fnameescape(ale#path#Simplify(l:full_path))
|
||||
endfunction
|
||||
|
||||
function! s:RemoveModule(results) abort
|
||||
for l:item in a:results
|
||||
if has_key(l:item, 'module')
|
||||
call remove(l:item, 'module')
|
||||
endif
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
" Return loclist data without the module string, only in newer Vim versions.
|
||||
function! ale#test#GetLoclistWithoutModule() abort
|
||||
let l:results = getloclist(0)
|
||||
call s:RemoveModule(l:results)
|
||||
|
||||
return l:results
|
||||
endfunction
|
||||
|
||||
function! ale#test#GetQflistWithoutModule() abort
|
||||
let l:results = getqflist()
|
||||
call s:RemoveModule(l:results)
|
||||
|
||||
return l:results
|
||||
endfunction
|
||||
|
||||
@@ -43,7 +43,7 @@ function! ale#toggle#Toggle() abort
|
||||
call s:CleanupEveryBuffer()
|
||||
call s:DisablePostamble()
|
||||
|
||||
if has('balloon_eval')
|
||||
if exists('*ale#balloon#Disable')
|
||||
call ale#balloon#Disable()
|
||||
endif
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user