workaround for float position

This commit is contained in:
Yasuhiro Matsumoto
2022-11-20 01:09:45 +09:00
parent e42203b4f0
commit 83ad2b78b6

View File

@@ -96,8 +96,7 @@ endfunction
function! s:compute_position(size) abort
let l:pos = screenpos(0, line('.'), col('.'))
if l:pos.row == 0 && l:pos.col == 0
" When the specified position is not visible
return []
let l:pos = {'curscol': screencol(), 'row': screenrow()}
endif
let l:pos = [l:pos.row + 1, l:pos.curscol + 1]
if l:pos[0] + a:size.height > &lines