This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
local Buffer = require 'u.buffer'
|
||||
|
||||
--- @class u.CodeWriter
|
||||
--- @field lines string[]
|
||||
--- @field indent_level number
|
||||
@@ -25,7 +23,8 @@ end
|
||||
|
||||
--- @param p u.Pos
|
||||
function CodeWriter.from_pos(p)
|
||||
local line = Buffer.from_nr(p.bufnr):line(p.lnum):text()
|
||||
local Range = require 'u.range'
|
||||
local line = Range.from_line(p.bufnr, p.lnum):text()
|
||||
return CodeWriter.from_line(line, p.bufnr)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user