Skip to content

Commit 2a6479a

Browse files
committed
fix(cond): check matched trigger, fix #3
1 parent 0599f47 commit 2a6479a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lua/luasnip-snippets/utils/common_cond.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ local function line_begin_show_maker(trig)
1515
local _, col = unpack(vim.api.nvim_win_get_cursor(0))
1616
local line = vim.api.nvim_get_current_line()
1717
local trigger = line:sub(1, col):match("%S+$")
18+
if trigger == nil then
19+
return false
20+
end
1821
if #trigger > #trig then
1922
return false
2023
end

0 commit comments

Comments
 (0)