Add space after input field

This commit is contained in:
Daniel Mathiot
2021-08-27 22:02:50 +02:00
parent 6c89fd0714
commit 1e1b780877

View File

@@ -53,9 +53,10 @@ neogen.generate = function(opts)
) )
if #content ~= 0 then if #content ~= 0 then
local jump_text = language.jump_text or neogen.configuration.jump_text
neogen.utilities.cursor.del_extmarks() -- Delete previous extmarks before setting any new ones neogen.utilities.cursor.del_extmarks() -- Delete previous extmarks before setting any new ones
local jump_text = language.jump_text or neogen.configuration.jump_text
--- Removes jump_text marks and keep the second part of jump_text|other_text if there is one (which is other_text) --- Removes jump_text marks and keep the second part of jump_text|other_text if there is one (which is other_text)
local delete_marks = function(v) local delete_marks = function(v)
local pattern = jump_text .. "[|%w]+" local pattern = jump_text .. "[|%w]+"
@@ -64,7 +65,7 @@ neogen.generate = function(opts)
if matched then if matched then
local split = vim.split(matched, "|", true) local split = vim.split(matched, "|", true)
if #split == 2 then if #split == 2 then
return string.gsub(v, jump_text .. "|", "") return string.gsub(v, jump_text .. "|", "") .. " "
end end
else else
return string.gsub(v, jump_text, "") return string.gsub(v, jump_text, "")