Skip to content

Commit 6558938

Browse files
committed
Fix to notify correct external pum information to Neovim side. (#388)
1 parent 1cc8e2e commit 6558938

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Diff for: editor/popupmenu.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -434,9 +434,12 @@ func (p *PopupMenu) setWidgetSize() {
434434
height := p.itemNum*(lineHeight+editor.config.Editor.Linespace+2) + 2 + editor.iconSize*2/5
435435
p.widget.SetFixedSize2(width, height)
436436

437+
rows := float64(width) / p.ws.font.cellwidth
438+
cols := float64(height) / float64(p.ws.font.lineHeight)
439+
437440
p.ws.nvim.SetPumBounds(
438-
float64(width),
439-
float64(height),
441+
rows,
442+
cols,
440443
float64(p.row),
441444
float64(p.col),
442445
)

0 commit comments

Comments
 (0)