aboutsummaryrefslogtreecommitdiff
path: root/runtime/plugin
diff options
context:
space:
mode:
authorKillTheMule <KillTheMule@users.noreply.github.com>2016-05-03 21:16:53 +0200
committerKillTheMule <KillTheMule@users.noreply.github.com>2016-05-03 21:22:45 +0200
commit7b29dfc43a0220cfc20d657e68eeddaa0d1d3674 (patch)
tree5adde1502b16d953d6ef48cea485e4e3e7209d45 /runtime/plugin
parentb634cfcc196fef0b17c48f9669c4e2eb7a1fcc26 (diff)
downloadrneovim-7b29dfc43a0220cfc20d657e68eeddaa0d1d3674.tar.gz
rneovim-7b29dfc43a0220cfc20d657e68eeddaa0d1d3674.tar.bz2
rneovim-7b29dfc43a0220cfc20d657e68eeddaa0d1d3674.zip
vim-patch:256972a
Updated runtime files. https://github.com/vim/vim/commit/256972a9849b5d575b62a6a71be5b6934b5b0e8b Missing files in runtime/doc: todo.txt, tags. Patch to runtime/doc/syntax.txt was applied manually in part, for no discernible reason.
Diffstat (limited to 'runtime/plugin')
-rw-r--r--runtime/plugin/matchparen.vim11
1 files changed, 8 insertions, 3 deletions
diff --git a/runtime/plugin/matchparen.vim b/runtime/plugin/matchparen.vim
index 3804ab949a..2a5a16a57e 100644
--- a/runtime/plugin/matchparen.vim
+++ b/runtime/plugin/matchparen.vim
@@ -55,14 +55,19 @@ function! s:Highlight_Matching_Pair()
let before = 0
let text = getline(c_lnum)
- let c = text[c_col - 1]
+ let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\)')
+ if empty(matches)
+ let [c_before, c] = ['', '']
+ else
+ let [c_before, c] = matches[1:2]
+ endif
let plist = split(&matchpairs, '.\zs[:,]')
let i = index(plist, c)
if i < 0
" not found, in Insert mode try character before the cursor
if c_col > 1 && (mode() == 'i' || mode() == 'R')
- let before = 1
- let c = text[c_col - 2]
+ let before = strlen(c_before)
+ let c = c_before
let i = index(plist, c)
endif
if i < 0