diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2026-05-30 16:18:49 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2026-05-30 16:18:49 +0200 |
| commit | b4da920a7ed42e83ca81047e9c5d46b28bb21991 (patch) | |
| tree | 01604717c3e7a2918a0c7c0a9f45e480fb2972aa /util.lua | |
| parent | 5847137f3d4a58475427bc128da929a649ebea14 (diff) | |
| download | vis-lspc-b4da920a7ed42e83ca81047e9c5d46b28bb21991.tar.gz vis-lspc-b4da920a7ed42e83ca81047e9c5d46b28bb21991.zip | |
use the correct names of the position conversion functions
Diffstat (limited to 'util.lua')
| -rw-r--r-- | util.lua | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |
