feat: Allow multiple jumps in the same line (#9)
This commit is contained in:
@@ -94,9 +94,15 @@ neogen.generate = function(opts)
|
|||||||
neogen.utilities.cursor.create(to_place + 1, start_column)
|
neogen.utilities.cursor.create(to_place + 1, start_column)
|
||||||
-- Creates extmarks for the content
|
-- Creates extmarks for the content
|
||||||
for i, value in pairs(content_with_marks) do
|
for i, value in pairs(content_with_marks) do
|
||||||
local input_start, _ = string.find(value, jump_text)
|
local start = 0
|
||||||
if input_start then
|
local count = 0
|
||||||
neogen.utilities.cursor.create(to_place + i, input_start)
|
while true do
|
||||||
|
start = string.find(value, jump_text, start + 1)
|
||||||
|
if not start then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
neogen.utilities.cursor.create(to_place + i, start - count * #jump_text)
|
||||||
|
count = count + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user