vim.diagnostic.open_float
opens window one character beyond end of diagnostic
#21958
Labels
vim.diagnostic.open_float
opens window one character beyond end of diagnostic
#21958
Describe the bug
vim.diagnostic.open_float
works one column beyond the end of the diagnostic. I think it's because thisd.end_col >= col
should bed.end_col > col
sinceend_col
is exclusive. But reasoning about off-by-one errors is hard so someone more familiar with the code should think about whether that fix will present other issues before applying it.Steps to reproduce
Call
vim.diagnostic.open_float
one column past the diagnostic and observe that the window opens.Expected behavior
vim.diagnostic.open_float
should only work if called inside the diagnostic.Neovim version (nvim -v)
0.7.0
Vim (not Nvim) behaves the same?
N/A
Operating system/version
CentOS 7.9
Terminal name/version
xfce4-terminal 0.8.10 (Xfce 4.16)
$TERM environment variable
tmux-256color
Installation
system package manager
The text was updated successfully, but these errors were encountered: