mirror of https://github.com/dense-analysis/ale
Return floating_preview window id (#4828)
Make ale#floating_preview#Show more similar to popup_create and return the id of the window so it's easy to set the filetype of the resulting buffer. Update test stub version of Show() to return a win id (the current window since it's not actually creating a window). Test * both tests still pass
This commit is contained in:
parent
2e5f135836
commit
0b4c665840
|
@ -21,6 +21,8 @@ function! ale#floating_preview#Show(lines, ...) abort
|
|||
else
|
||||
call s:VimShow(a:lines, l:options)
|
||||
endif
|
||||
|
||||
return w:preview.id
|
||||
endfunction
|
||||
|
||||
function! s:NvimShow(lines, options) abort
|
||||
|
|
|
@ -12,6 +12,7 @@ Before:
|
|||
function! ale#floating_preview#Show(lines, ...) abort
|
||||
let g:floating_preview_show_called = 1
|
||||
let g:floated_lines = a:lines
|
||||
return win_getid()
|
||||
endfunction
|
||||
|
||||
let g:ale_buffer_info = {
|
||||
|
|
|
@ -25,6 +25,7 @@ Before:
|
|||
function! ale#floating_preview#Show(lines, ...) abort
|
||||
let g:floating_preview_show_called = 1
|
||||
let g:floated_lines = a:lines
|
||||
return win_getid()
|
||||
endfunction
|
||||
|
||||
function! ale#lsp_linter#StartLSP(buffer, linter, callback) abort
|
||||
|
|
Loading…
Reference in New Issue