From de4a88a2c84509951fa79cc85d5ad3e3245d2f31 Mon Sep 17 00:00:00 2001 From: yasuda Date: Mon, 5 Aug 2024 10:43:36 +0900 Subject: [PATCH] Ignore `matchdelete()` error --- autoload/highlightedput/highlight.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/highlightedput/highlight.vim b/autoload/highlightedput/highlight.vim index 3202f2e..a542143 100644 --- a/autoload/highlightedput/highlight.vim +++ b/autoload/highlightedput/highlight.vim @@ -117,7 +117,7 @@ endfunction function s:matchdelete_all(matchIDs, ...) abort let winid = get(a:000, 0, win_getid()) - return map(copy(a:matchIDs), { _, matchID -> matchdelete(matchID, winid) }) + return map(copy(a:matchIDs), { _, matchID -> execute(printf('call matchdelete(%d, %d)', matchID, winid), 'silent!') }) endfunction