Skip to content

Commit 947c98e

Browse files
committed
fix: catch matchadd error
1 parent 9584a79 commit 947c98e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/flygrep/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ local function open_win()
363363
pcall(vim.fn.matchdelete, search_hi_id, result_winid)
364364
pcall(vim.fn.timer_stop, grep_timer_id)
365365
pcall(job.stop, search_jobid)
366-
search_hi_id = vim.fn.matchadd(
366+
search_hi_id = pcall(vim.fn.matchadd,
367367
config.matched_higroup,
368368
grep_input:gsub('~', '\\~'),
369369
10,

0 commit comments

Comments
 (0)