Cleanup
This commit is contained in:
parent
bbb57ff024
commit
2a35d6ab9d
@ -431,7 +431,9 @@ function WrapContext:unwrap(opt)
|
||||
local cursor = nil
|
||||
for i, param in ipairs(self.params.parsed) do
|
||||
if param:is_active() then
|
||||
cursor = Cursor.new(0, #line + param.offset)
|
||||
cursor = Cursor.get_current()
|
||||
cursor.row = cursor.row - 1
|
||||
cursor.col = #line + param.offset
|
||||
end
|
||||
|
||||
line = line .. param.text
|
||||
@ -445,12 +447,6 @@ function WrapContext:unwrap(opt)
|
||||
vim.fn.setline(self.range.start.row, line)
|
||||
vim.fn.execute(string.format('%d,%dd_', self.range.start.row + 1, self.range.stop.row))
|
||||
|
||||
for _, param in ipairs(self.params.parsed) do
|
||||
if param:is_active() then
|
||||
cursor.row = Cursor:get_current().row - 1
|
||||
end
|
||||
end
|
||||
|
||||
if cursor then
|
||||
cursor:set_current()
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user