Skip to content

Commit 084fe4c

Browse files
author
skywind3000
committed
update: preview window set scrolloff to 0 by default
1 parent 270c144 commit 084fe4c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

autoload/quickui/preview.vim

Lines changed: 2 additions & 4 deletions
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: 2021/12/06 21:55
6+
" Last Modified: 2021/12/06 22:31
77
"
88
"======================================================================
99

@@ -159,9 +159,7 @@ function! quickui#preview#display(content, opts)
159159
if has_key(a:opts, 'syntax')
160160
let cmdlist += ['setl ft=' . fnameescape(a:opts.syntax) ]
161161
endif
162-
if has('nvim')
163-
let cmdlist += ['setlocal scrolloff=0']
164-
endif
162+
let cmdlist += ['silent! setlocal scrolloff=0']
165163
call setbufvar(winbufnr(winid), '__quickui_cursor__', cursor)
166164
call quickui#core#win_execute(winid, cmdlist)
167165
call quickui#utils#update_cursor(winid)

0 commit comments

Comments
 (0)