On So, 24 Jun 2018, Tony Mechelynck wrote:
> At startup from a handcoded Session.vim I get this error (which I
> didn't get before with the same session script)
>
> Error detected while processing function <SNR>24_Highlight_Matching_Pair:
> line 97:
> E475: Invalid argument: 0
>
> I get this several times, including when clicking the statusline of a
> non-current window to make it current.
> Script 24 (as listed by :scriptnames) is
> /usr/local/share/vim/vim81/plugin/matchparen.vim
>
> If I move the cursor, be it by keyboard or by mouse, I mostly don't
> get this message, and the matching brackets are highlighted correctly.
> However I do get it when the matched brackets are the first and last
> characters on a line. For instance when the line is
>
> <!-- P -->
>
> with 'matchpairs' set to (:),[:],{:},<:>
Most likely patch 8.1.112.
Can you try, if the following patch works for you?
diff --git a/runtime/plugin/matchparen.vim b/runtime/plugin/matchparen.vim
index 2b2392dfc..ad3113ce7 100644
--- a/runtime/plugin/matchparen.vim
+++ b/runtime/plugin/matchparen.vim
@@ -116,10 +116,10 @@ function! s:Highlight_Matching_Pair()
" outside of the syntax types and s_skip should keep its value so we skip any
" matching pair inside the syntax types.
if !has("syntax") || !exists("g:syntax_on")
- let s:skip = 0
+ let s_skip = '0'
else
try
- execute 'if' s_skip '| let s_skip = 0 | endif'
+ execute 'if' s_skip '| let s_skip = "0" | endif'
catch /^Vim\%((\a\+)\)\=:E363/
" We won't find anything, so skip searching, should keep Vim responsive.
return
Best,
Christian
--
Die vier Elemente: Erde, Luft und Feuerwasser.
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.