#1889 Add support for automatically previewing messages based on the cursor position

This commit is contained in:
w0rp
2018-09-14 12:42:26 +01:00
parent f380d8508e
commit 43d7e8fde9
5 changed files with 116 additions and 39 deletions

View File

@@ -15,13 +15,13 @@ function! ale#preview#Show(lines, ...) abort
setlocal modifiable
setlocal noreadonly
setlocal nobuflisted
let &l:filetype = get(l:options, 'filetype', 'ale-preview')
setlocal buftype=nofile
setlocal bufhidden=wipe
:%d
call setline(1, a:lines)
setlocal nomodifiable
setlocal readonly
let &l:filetype = get(l:options, 'filetype', 'ale-preview')
if get(l:options, 'stay_here')
wincmd p