diff --git a/autoload/quickui/context.vim b/autoload/quickui/context.vim index c358dbf..314afa9 100644 --- a/autoload/quickui/context.vim +++ b/autoload/quickui/context.vim @@ -513,7 +513,7 @@ function! s:nvim_create_context(textlist, opts) let opts.row = pos[0] - 1 let opts.col = pos[1] - 1 endif - if has('nvim-0.5.0') + if has('nvim-0.6.0') let opts.noautocmd = 1 endif let winid = nvim_open_win(bid, 0, opts) diff --git a/autoload/quickui/input.vim b/autoload/quickui/input.vim index 108cd52..074c865 100644 --- a/autoload/quickui/input.vim +++ b/autoload/quickui/input.vim @@ -149,7 +149,7 @@ function! s:nvim_create_input(prompt, opts) let opts.height = hwnd.h let opts.row = hwnd.opts.row let opts.col = hwnd.opts.col - if has('nvim-0.5.0') + if has('nvim-0.6.0') let opts.noautocmd = 1 endif let winid = nvim_open_win(hwnd.bid, 0, opts) @@ -163,7 +163,7 @@ function! s:nvim_create_input(prompt, opts) let op.row = hwnd.opts.row - 2 let op.col = hwnd.opts.col - 2 let bordercolor = hwnd.opts.bordercolor - if has('nvim-0.5.0') + if has('nvim-0.6.0') let op.noautocmd = 1 endif let background = nvim_open_win(nbid, 0, op) diff --git a/autoload/quickui/listbox.vim b/autoload/quickui/listbox.vim index e3a7a34..d8a1a9d 100644 --- a/autoload/quickui/listbox.vim +++ b/autoload/quickui/listbox.vim @@ -506,7 +506,7 @@ function! s:nvim_create_listbox(textlist, opts) let opts.row += 1 let opts.col += 1 endif - if has('nvim-0.5.0') + if has('nvim-0.6.0') let opts.noautocmd = 1 endif let winid = nvim_open_win(bid, 0, opts) @@ -521,7 +521,7 @@ function! s:nvim_create_listbox(textlist, opts) let op.row = opts.row - 1 let op.col = opts.col - 1 let bordercolor = get(a:opts, 'bordercolor', 'QuickBorder') - if has('nvim-0.5.0') + if has('nvim-0.6.0') let op.noautocmd = 1 endif let background = nvim_open_win(nbid, 0, op) diff --git a/autoload/quickui/menu.vim b/autoload/quickui/menu.vim index cf00ad4..adce503 100644 --- a/autoload/quickui/menu.vim +++ b/autoload/quickui/menu.vim @@ -711,7 +711,7 @@ function! quickui#menu#nvim_open_menu(opts) let opts.row = 0 let opts.relative = 'editor' let s:cmenu.bufnr = bid - if has('nvim-0.5.0') + if has('nvim-0.6.0') let opts.noautocmd = 1 endif let winid = nvim_open_win(bid, 0, opts) diff --git a/autoload/quickui/preview.vim b/autoload/quickui/preview.vim index 744af41..a88f03c 100644 --- a/autoload/quickui/preview.vim +++ b/autoload/quickui/preview.vim @@ -126,7 +126,7 @@ function! quickui#preview#display(content, opts) else let bid = quickui#core#scratch_buffer('preview', source) endif - if has('nvim-0.5.0') + if has('nvim-0.6.0') let opts.noautocmd = 1 endif let winid = nvim_open_win(bid, 0, opts) @@ -144,7 +144,7 @@ function! quickui#preview#display(content, opts) let op.row = pos.row - 1 let op.col = pos.col - 1 let bordercolor = get(a:opts, 'bordercolor', color) - if has('nvim-0.5.0') + if has('nvim-0.6.0') let op.noautocmd = 1 endif let background = nvim_open_win(nbid, 0, op) diff --git a/autoload/quickui/terminal.vim b/autoload/quickui/terminal.vim index af2ae52..31ac400 100644 --- a/autoload/quickui/terminal.vim +++ b/autoload/quickui/terminal.vim @@ -86,7 +86,7 @@ function! quickui#terminal#create(cmd, opts) let opts.height = h let opts.row = hwnd.opts.line - 1 + ((border > 0)? 1 : 0) let opts.col = hwnd.opts.col - 1 + ((border > 0)? 1 : 0) - if has('nvim-0.5.0') + if has('nvim-0.6.0') let opts.noautocmd = 1 endif let winid = nvim_open_win(bid, 1, opts) @@ -109,7 +109,7 @@ function! quickui#terminal#create(cmd, opts) let pos = nvim_win_get_config(winid) let op.row = hwnd.opts.line - 1 let op.col = hwnd.opts.col - 1 - if has('nvim-0.5.0') + if has('nvim-0.6.0') let op.noautocmd = 1 endif let background = nvim_open_win(nbid, 0, op) diff --git a/autoload/quickui/textbox.vim b/autoload/quickui/textbox.vim index 146636a..7378af8 100644 --- a/autoload/quickui/textbox.vim +++ b/autoload/quickui/textbox.vim @@ -222,7 +222,7 @@ function! s:nvim_create_textbox(textlist, opts) let opts.row += 1 let opts.col += 1 endif - if has('nvim-0.5.0') + if has('nvim-0.6.0') let opts.noautocmd = 1 endif let winid = nvim_open_win(bid, 0, opts) @@ -248,7 +248,7 @@ function! s:nvim_create_textbox(textlist, opts) let op.row = pos.row - 1 let op.col = pos.col - 1 let bordercolor = get(a:opts, 'bordercolor', 'QuickBorder') - if has('nvim-0.5.0') + if has('nvim-0.6.0') let op.noautocmd = 1 endif let background = nvim_open_win(nbid, 0, op) diff --git a/autoload/quickui/utils.vim b/autoload/quickui/utils.vim index b63ad98..7486583 100644 --- a/autoload/quickui/utils.vim +++ b/autoload/quickui/utils.vim @@ -434,18 +434,6 @@ function! quickui#utils#get_cursor(winid) endfunc -"---------------------------------------------------------------------- -" first line to show in window. -"---------------------------------------------------------------------- -function! quickui#utils#set_firstline(winid, line) - if g:quickui#core#has_nvim == 0 - call popup_setoptions(a:winid, {'firstline': a:line}) - else - call nvim_win_set_cursor(a:winid, [a:line, 0]) - endif -endfunc - - "---------------------------------------------------------------------- " get topline in current window "----------------------------------------------------------------------