mirror of
https://github.com/neovim/neovim.git
synced 2026-04-26 17:24:18 +00:00
vim-patch:9.0.2022: getmousepos() returns wrong index for TAB char (#25636)
Problem: When clicking in the middle of a TAB, getmousepos() returns
the column of the next char instead of the TAB.
Solution: Break out of the loop when the vcol to find is inside current
char. Fix invalid memory access when calling virtcol2col() on
an empty line.
closes: vim/vim#13321
b583eda703
This commit is contained in:
2
runtime/lua/vim/_meta/vimfn.lua
generated
2
runtime/lua/vim/_meta/vimfn.lua
generated
@@ -10099,6 +10099,8 @@ function vim.fn.virtcol(expr, list, winid) end
|
||||
--- character in window {winid} at buffer line {lnum} and virtual
|
||||
--- column {col}.
|
||||
---
|
||||
--- If buffer line {lnum} is an empty line, 0 is returned.
|
||||
---
|
||||
--- If {col} is greater than the last virtual column in line
|
||||
--- {lnum}, then the byte index of the character at the last
|
||||
--- virtual column is returned.
|
||||
|
||||
Reference in New Issue
Block a user