diff options
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 |
