Fix #757 - Show :ALEDetail messages in a window
This commit is contained in:
@@ -125,9 +125,7 @@ function! ale#cursor#ShowCursorDetail() abort
|
||||
if !empty(l:loc)
|
||||
let l:message = get(l:loc, 'detail', l:loc.text)
|
||||
|
||||
call s:EchoWithShortMess('off', l:message)
|
||||
|
||||
" Set the echo marker, so we can clear it by moving the cursor.
|
||||
let l:info.echoed = 1
|
||||
call ale#preview#Show(split(l:message, "\n"))
|
||||
echo
|
||||
endif
|
||||
endfunction
|
||||
|
||||
18
autoload/ale/preview.vim
Normal file
18
autoload/ale/preview.vim
Normal file
@@ -0,0 +1,18 @@
|
||||
" Author: w0rp <devw0rp@gmail.com>
|
||||
" Description: Preview windows for showing whatever information in.
|
||||
|
||||
" Open a preview window and show some lines in it.
|
||||
function! ale#preview#Show(lines) abort
|
||||
silent pedit ALEPreviewWindow
|
||||
wincmd P
|
||||
setlocal modifiable
|
||||
setlocal noreadonly
|
||||
setlocal nobuflisted
|
||||
setlocal filetype=ale-preview
|
||||
setlocal buftype=nofile
|
||||
setlocal bufhidden=wipe
|
||||
:%d
|
||||
call setline(1, a:lines)
|
||||
setlocal nomodifiable
|
||||
setlocal readonly
|
||||
endfunction
|
||||
Reference in New Issue
Block a user