summaryrefslogtreecommitdiffstats
path: root/runtime/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/plugin')
-rw-r--r--runtime/plugin/matchparen.vim5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/plugin/matchparen.vim b/runtime/plugin/matchparen.vim
index 3982489b92..e19b283228 100644
--- a/runtime/plugin/matchparen.vim
+++ b/runtime/plugin/matchparen.vim
@@ -108,8 +108,9 @@ func s:Highlight_Matching_Pair()
" searchpairpos()'s skip argument.
" We match "escape" for special items, such as lispEscapeSpecial, and
" match "symbol" for lispBarSymbol.
- let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' .
- \ '''v:val =~? "string\\|character\\|singlequote\\|escape\\|symbol\\|comment"''))'
+ let s_skip = 'synstack(".", col("."))'
+ \ . '->indexof({_, id -> synIDattr(id, "name") =~? '
+ \ . '"string\\|character\\|singlequote\\|escape\\|symbol\\|comment"}) >= 0'
" If executing the expression determines that the cursor is currently in
" one of the syntax types, then we want searchpairpos() to find the pair
" within those syntax types (i.e., not skip). Otherwise, the cursor is