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:
haoxian 2023-02-02 12:06:34 +08:00 committed by Stephan Seitz
parent f6df07be12
commit dd600cf1c2

View file

@ -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