From b4da920a7ed42e83ca81047e9c5d46b28bb21991 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sat, 30 May 2026 16:18:49 +0200 Subject: use the correct names of the position conversion functions --- util.lua | 8 ++++---- 1 file 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 -- cgit v1.2.3