summaryrefslogtreecommitdiff
path: root/lua/99/geo.lua
diff options
context:
space:
mode:
authortheprimeagain <the.primeagen@gmail.com>2026-02-04 07:54:06 -0700
committertheprimeagain <the.primeagen@gmail.com>2026-02-04 07:54:06 -0700
commit784926514bde856d60605c0b0dcfe6d0b7a876b3 (patch)
tree201c247e2f6c3470813edec9b0df69d636b727c8 /lua/99/geo.lua
parentfa382ce21c4aab49cb0d46a19e8cc0113a3329c6 (diff)
downloada4-784926514bde856d60605c0b0dcfe6d0b7a876b3.tar.xz
a4-784926514bde856d60605c0b0dcfe6d0b7a876b3.zip
fixed not capturing the whole line
Diffstat (limited to 'lua/99/geo.lua')
-rw-r--r--lua/99/geo.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/lua/99/geo.lua b/lua/99/geo.lua
index c160e3b..cf70c48 100644
--- a/lua/99/geo.lua
+++ b/lua/99/geo.lua
@@ -240,6 +240,7 @@ function Range.from_visual_selection()
vim.api.nvim_buf_get_lines(buffer, start_r, end_row, false)
end_row = start_r + #selected_lines
--- another edge case, the buffer may be empty...
+ --- sentry literally caught this one
if #selected_lines == 0 then
--- an edge to the edge case. we are in 1 based indexing... f
end_col = 1
@@ -250,7 +251,9 @@ function Range.from_visual_selection()
--- in the geo_spec test, this would result in end_row = 2, end_col = 8
--- so, there is this -1 because we are going to go from 1 based to 0 based
end_row = end_row - 1
- end_col = end_col - 1
+
+ --- we need to capture the whole line, therefore its end of line + 1
+ end_col = end_col
else
end_col = #end_line[1] + 1
end