From fdd0a7082690384af9bcaf3113a197123658749e Mon Sep 17 00:00:00 2001 From: Hanh Le Date: Mon, 13 Jul 2020 19:54:42 +0700 Subject: [PATCH] Fix non-existed key --- plugin/auto-pairs.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/auto-pairs.vim b/plugin/auto-pairs.vim index af5eb32..c12e840 100644 --- a/plugin/auto-pairs.vim +++ b/plugin/auto-pairs.vim @@ -186,7 +186,9 @@ func! AutoPairsDefine(pairs, ...) let r = AutoPairsDefaultPairs() if a:0 > 0 for open in a:1 - unlet r[open] + if has_key(r, open) + unlet r[open] + end endfor end for [open, close] in items(a:pairs)