Closed
Description
Describe the bug
It seems popup.open
place floating window on Neovim in wrong place.
It seems Vim's col/row starts from 1 but Neovim starts from 0. We should consider the col/row starts from 1 in both case (I'm not sure. We need to make sure this before fix.)
Provide a minimal vimrc with less than 50 lines to reproduce
set nonumber
set signcolumn=no
" Optional
set showtabline=0
call denops#request('whateverdenopsplugin', 'popup', [])
import type { Entrypoint } from "jsr:@denops/std@^7.0.0";
import * as popup from "jsr:@denops/std@^7.0.0/popup";
export const main: Entrypoint = (denops) => {
denops.dispatcher = {
async popup() {
await popup.open(denops, {
relative: "editor",
width: 3,
height: 3,
col: 5,
row: 5,
highlight: {
normal: "IncSearch",
},
});
await popup.open(denops, {
relative: "editor",
width: 3,
height: 3,
col: 10,
row: 5,
border: "single",
highlight: {
normal: "IncSearch",
},
});
},
};
};
How to reproduce the problem from Vim startup
:source test.vim
Expected behavior
Both Vim and Neovim place window in same location.
Actual behavior
It seems Neovim put floating window in invalid location.
Screenshots (if need)
Your environment
- OS:
uname -a
(macOS/Linux) orver
(Windows) - Deno version:
deno --version
- Vim/Neovim version:
vim --version
ornvim --version
- Denops version:
git log -1
(run in the denops.vim repository)
Additional context
Files
12345678901234567890123456789
2 1 2
3
4
5
6
7
8
9
10
11
12
13
14
15