Hi
Title error message appears when the cursor moves between curly brackets in a bash file. The file contains ' { } '. ( There are four characters)
it seems the error is not logical and it is reported after patch 8.1.0112.
==========================
steps to duplicate:
(1) echo " ' {} ' " > /tmp/2.sh
(2) vim((v8.1.0112)|BISECTING)$ src/vim /tmp/2.sh
(3) cross the cursor '{' and '}' by moving left to right. error appears
===========================
details error:
Error detected while processing function 39_Highlight_Matching_Pair:
line 78:
E475: Invalid argument: 0
===========================
vim((v8.1.0111)|BISECTING)$ git bisect good
3dddb09 is the first bad commit
commit 3dddb09
Author: Bram Moolenaar Br...@vim.org
Date: Sun Jun 24 19:01:59 2018 +0200
patch 8.1.0112: no error when using bad arguments with searchpair()
Problem: No error when using bad arguments with searchpair().
Solution: Add error messages.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
Please update the runtime files to 8.1.0143 (or later).
It includes a fix for this.
Closed #3280.
Duplicate of #3225.
Neither 8.1.0143 nor v8.1.0239 fixes the issue.
> Error detected while processing function 39_Highlight_Matching_Pair:
> line 78:
> E475: Invalid argument: 0
I can't reproduce this, with 8.1.0239. I suspect some other plugin or setting is confusing the matchparen.vim plugin. Does it still occur with
vim --clean -N -c 'ru plugin/matchparen.vim' 2.sh
If it does, can you tell us what is in the line in matchparen.vim for which the error is reported? My line 78 is blank.
Regards, John Little
Please make sure that the updated matchparen.vim script is loaded.
If you execute vim without installing, old version of the script might be loaded.
To check which file is loaded, you can use the :scriptnames command.
Error detected while processing function <SNR>39_Highlight_Matching_Pair:
The message says <SNR>39, so you should check the 39th scripts in the result of :scriptnames.
If the Last Change date of the script is not 2018 Jul 3, your script is old.
line 78:
E475: Invalid argument: 0
This means that the error is occurred at the 78th line of the s:Highlight_Matching_Pair() function.
The 78th line of the function in the old version is:
https://github.com/vim/vim/blob/01164a6546b4c635daf96a1f17d1cb2d07f32a66/runtime/plugin/matchparen.vim#L117
And the 78th line of the function in the latest version is:
https://github.com/vim/vim/blob/218beb3e96bcb7b20395be3bec6076c767be71a1/runtime/plugin/matchparen.vim#L117
Obviously, the line in the latest version is a comment. So the error won't happen at the line with the latest version.
You are right. Old script was used. with new script issue is closed