feat: add extmarks on jumps

This commit is contained in:
danymat
2022-01-09 21:36:34 +01:00
parent e3445e8f88
commit cb3569dda1
2 changed files with 15 additions and 4 deletions

View File

@@ -91,7 +91,7 @@ neogen.generate = function(opts)
-- First and last extmarks are needed to know the range of inserted content
if neogen.configuration.input_after_comment == true then
-- Creates extmark for the beggining of the content
neogen.utilities.cursor.create(to_place + 1, start_column)
neogen.utilities.cursor.create(to_place + 1, start_column, true)
-- Creates extmarks for the content
for i, value in pairs(content_with_marks) do
local start = 0
@@ -107,7 +107,7 @@ neogen.generate = function(opts)
end
-- Creates extmark for the end of the content
neogen.utilities.cursor.create(to_place + #content + 1, 0)
neogen.utilities.cursor.create(to_place + #content + 1, 0, true)
neogen.utilities.cursor.jump({ first_time = true })
end