Skip to content

Commit

Permalink
update: preview window set scrolloff to 0 by default
Browse files Browse the repository at this point in the history
  • Loading branch information
skywind3000 committed Dec 6, 2021
1 parent 270c144 commit 084fe4c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions autoload/quickui/preview.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
" preview.vim -
"
" Created by skywind on 2020/01/11
" Last Modified: 2021/12/06 21:55
" Last Modified: 2021/12/06 22:31
"
"======================================================================

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

0 comments on commit 084fe4c

Please sign in to comment.