Fix bug where [-=] did not work at the start of lines

This commit is contained in:
2025-02-12 15:47:41 +03:00
parent 68ade44490
commit abf2343e59

View File

@@ -228,7 +228,7 @@ local function handle_inp()
local idx = string.find(line, ";")
vim.api.nvim_buf_set_text(0, i - 1, 0, i - 1, idx + 0, { " ;0 " })
right(-1)
elseif line:match(" =$") then
elseif line:match("^%s*%=$") then
local idx = string.find(line, "=")
vim.api.nvim_buf_set_text(
0,
@@ -239,7 +239,7 @@ local function handle_inp()
{ "==================================================" }
)
right(-1)
elseif line:match(" %-$") then
elseif line:match("^%s*%-$") then
local idx = string.find(line, "%-")
vim.api.nvim_buf_set_text(0, i - 1, 0, i - 1, idx + 0, { " -- " })
right(-1)