vim-patch:9.0.2032: cannot get mouse click pos for tab or virt text (#25653)

Problem:  Cannot accurately get mouse clicking position when clicking on
          a TAB or with virtual text.
Solution: Add a "coladd" field to getmousepos() result.

closes: vim/vim#13335

f5a94d5165
This commit is contained in:
zeertzjq
2023-10-15 17:19:01 +08:00
committed by GitHub
parent a350fb2976
commit d974a3dcbb
8 changed files with 59 additions and 10 deletions

View File

@@ -2155,13 +2155,14 @@ describe("folded lines", function()
meths.input_mouse('left', 'press', '', multigrid and 2 or 0, 4, 0)
eq({
column = 1,
line = 3,
screencol = 1,
screenrow = 5,
wincol = 1,
winid = 1000,
wincol = 1,
winrow = 5,
line = 3,
column = 1,
coladd = 0,
}, funcs.getmousepos())
meths.buf_set_extmark(0, ns, 1, 0, { virt_lines = {{{"more virt_line below line 2", ""}}} })