From abf2343e5942bbec610d0b639678b4c05d570eb7 Mon Sep 17 00:00:00 2001 From: Syed Daanish Date: Wed, 12 Feb 2025 15:47:41 +0300 Subject: [PATCH] Fix bug where [-=] did not work at the start of lines --- lua/udivim.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/udivim.lua b/lua/udivim.lua index 7b4ef5e..3c12434 100644 --- a/lua/udivim.lua +++ b/lua/udivim.lua @@ -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)