Skip to content

Commit

Permalink
Merge pull request #460 from lambdalisue/fix-getcurpos
Browse files Browse the repository at this point in the history
🐛 Fix "E118: Too many arguments for function: getcurpos"
  • Loading branch information
lambdalisue authored Dec 11, 2022
2 parents 908a3db + b5a1b14 commit 41710c3
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions autoload/fern/internal/drawer/hover_popup.vim
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,21 @@ function! s:show() abort

if has('nvim')
let s:win = nvim_open_win(nvim_create_buf(v:false, v:true), v:false, {
\ 'relative': 'win',
\ 'bufpos': [line('.') - 2, 0],
\ 'width': line_width,
\ 'height': 1,
\ 'noautocmd': v:true,
\ 'style': 'minimal',
\ })
\ 'relative': 'win',
\ 'bufpos': [line('.') - 2, 0],
\ 'width': line_width,
\ 'height': 1,
\ 'noautocmd': v:true,
\ 'style': 'minimal',
\})
else
" calculate position of popup
let drawer_winid = win_getid()
let pos = getcurpos(drawer_winid)
let curpos = screenpos(drawer_winid, pos[1], 1)

let curpos = screenpos(win_getid(), getcurpos()[1], 1)
let s:win = popup_create(line, {
\ 'line': 'cursor',
\ 'col': curpos['col'],
\ 'maxwidth': line_width,
\ })
\ 'line': 'cursor',
\ 'col': curpos['col'],
\ 'maxwidth': line_width,
\})
endif

function! s:apply() abort closure
Expand Down

0 comments on commit 41710c3

Please sign in to comment.