From 084fe4cb7720808e6674b80b9b98bd6f01147392 Mon Sep 17 00:00:00 2001 From: skywind3000 Date: Mon, 6 Dec 2021 22:31:54 +0800 Subject: [PATCH] update: preview window set scrolloff to 0 by default --- autoload/quickui/preview.vim | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/autoload/quickui/preview.vim b/autoload/quickui/preview.vim index a5e6677..98e2dc8 100644 --- a/autoload/quickui/preview.vim +++ b/autoload/quickui/preview.vim @@ -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 " "====================================================================== @@ -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)