aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2026-05-30 16:18:49 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2026-05-30 16:18:49 +0200
commitb4da920a7ed42e83ca81047e9c5d46b28bb21991 (patch)
tree01604717c3e7a2918a0c7c0a9f45e480fb2972aa
parent5847137f3d4a58475427bc128da929a649ebea14 (diff)
downloadvis-lspc-b4da920a7ed42e83ca81047e9c5d46b28bb21991.tar.gz
vis-lspc-b4da920a7ed42e83ca81047e9c5d46b28bb21991.zip
use the correct names of the position conversion functions
-rw-r--r--util.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/util.lua b/util.lua
index ddc7452..aed1032 100644
--- a/util.lua
+++ b/util.lua
@@ -259,9 +259,9 @@ end
-- @return a table of positions
function util.vis_sorted_selections_to_pos(file, sorted_selections)
local positions = {}
- if file.pos_by_linecol then
+ if file.offset_from_line_column then
for _, sel in ipairs(sorted_selections) do
- table.insert(positions, file:pos_by_linecol(sel.line, sel.col))
+ table.insert(positions, file:offset_from_line_column(sel.line, sel.col))
end
return positions
end
@@ -319,8 +319,8 @@ end
-- @return the 1-based line number
-- @return the 1-based column
function util.vis_pos_to_sel(win, pos)
- if win.file.linecol_by_pos then
- local lineno, col = win.file:linecol_by_pos(pos)
+ if win.file.line_column_from_offset then
+ local lineno, col = win.file:line_column_from_offset(pos)
return {line = lineno, col = col}
end