mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix: incremental_selection error
if some empty lines in the end of file, would throw error messages when incremental_selection to the whole file.
This commit is contained in:
parent
f6df07be12
commit
dd600cf1c2
1 changed files with 1 additions and 0 deletions
|
|
@ -246,6 +246,7 @@ function M.get_vim_range(range, buf)
|
|||
else
|
||||
ecol = #api.nvim_buf_get_lines(buf, erow - 1, erow, false)[1]
|
||||
end
|
||||
ecol = math.max(ecol, 1)
|
||||
end
|
||||
return srow, scol, erow, ecol
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue