Skip to content

Commit

Permalink
Merge pull request #67 from JimmyHuang454/master
Browse files Browse the repository at this point in the history
add set_firstline()
  • Loading branch information
skywind3000 authored Jan 21, 2022
2 parents 90ec2a2 + aaba2f3 commit e3e19c9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions autoload/quickui/utils.vim
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,18 @@ 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
"----------------------------------------------------------------------
Expand Down

0 comments on commit e3e19c9

Please sign in to comment.