Skip to content

Commit a2f44f9

Browse files
committedNov 13, 2024
🐛 Fix row/col on popup.open
Close #274
1 parent ec2d3ab commit a2f44f9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎popup/nvim.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@ function toNvimWinSetConfig(
8282
anchor: options.anchor,
8383
width: options.width,
8484
height: options.height,
85-
col: options.col,
86-
row: options.row,
85+
// Neovim col/row is 0-based
86+
col: options.col !== undefined ? options.col - 1 : undefined,
87+
row: options.row !== undefined ? options.row - 1 : undefined,
8788
focusable: false, // To keep consistent with the behavior of Vim's `popup_create()`
8889
zindex: options.zindex,
8990
border: options.border ? toNvimBorder(options.border) : undefined,

0 commit comments

Comments
 (0)