mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 03:10:04 -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
|
else
|
||||||
ecol = #api.nvim_buf_get_lines(buf, erow - 1, erow, false)[1]
|
ecol = #api.nvim_buf_get_lines(buf, erow - 1, erow, false)[1]
|
||||||
end
|
end
|
||||||
|
ecol = math.max(ecol, 1)
|
||||||
end
|
end
|
||||||
return srow, scol, erow, ecol
|
return srow, scol, erow, ecol
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue