Skip to content

Commit 084c29f

Browse files
author
skywind3000
committed
fixed: neovim preview scroll problem
1 parent 06ae891 commit 084c29f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

autoload/quickui/preview.vim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" preview.vim -
44
"
55
" Created by skywind on 2020/01/11
6-
" Last Modified: 2020/01/11 11:30:20
6+
" Last Modified: 2021/12/06 21:45
77
"
88
"======================================================================
99

@@ -155,6 +155,9 @@ function! quickui#preview#display(content, opts)
155155
if has_key(a:opts, 'syntax')
156156
let cmdlist += ['setl ft=' . fnameescape(a:opts.syntax) ]
157157
endif
158+
if has('nvim')
159+
let cmdlist += ['setlocal scrolloff=0']
160+
endif
158161
call setbufvar(winbufnr(winid), '__quickui_cursor__', cursor)
159162
call quickui#core#win_execute(winid, cmdlist)
160163
call quickui#utils#update_cursor(winid)

0 commit comments

Comments
 (0)