-
Bug
-
Resolution: Incomplete
-
Minor
-
None
-
None
-
kernel-name: Linux
kernel-release: 4.5.2-1
kernel-version: #1 SMP Fri May 6 06:19:05 2016
machine: x86_64
processor: Intel(R) Core(TM) i7-4710MQ CPU @ 2.50GHz
hardware-platform: GenuineIntel
operating-system: GNU/LinuxVIM - Vi IMproved 8.0 (2016 Sep 12, compiled Dec 3 2016 01:06:17)
Included patches: 1-106
Modified by Gentoo-8.0.0106AND
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jul 21 2016 00:44:13)
Included patches: 1-1821
Modified by Gentoo-7.4.1821zsh versions 5.2 and 5.3
kernel-name: Linux kernel-release: 4.5.2-1 kernel-version: #1 SMP Fri May 6 06:19:05 2016 machine: x86_64 processor: Intel(R) Core(TM) i7-4710MQ CPU @ 2.50GHz hardware-platform: GenuineIntel operating-system: GNU/Linux VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Dec 3 2016 01:06:17) Included patches: 1-106 Modified by Gentoo-8.0.0106 AND VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jul 21 2016 00:44:13) Included patches: 1-1821 Modified by Gentoo-7.4.1821 zsh versions 5.2 and 5.3
Matching brace error in vim. This was found in a zsh script, but it would most likely happen in other scripting languages.
Vim matching fails to ignore braces in lines that have been commented out. Vim can do normal highlighting across commented code without a problem, but finding a matching brace fails.
Sample Code:
DoIt () { #[ something ] && { [ somethingelse ] && { : } }
Commented out a [test] while checking out a [different test]. The script runs without any issues, but vim syntax highlight has a matching issue. As seen in the attached file vim_matching_issue_01.png, the cursor is on the opening brace below the function declaration Doit, and the matching highlight is on the brace at the end of the function. Typing % character should move the cursor to the brace at the end of the function, but nothing happens. Manually moving the cursor to the brace at the end of the function produces a highlight as expected on the opening brace below the function declaration Doit as seen in the attached file vim_matching_issue_02.png. Typing the % character moves the cursor to the opening brace at the end of the line that is commented out and highlights the end brace at the end of the function as seen in the attached file vim_matching_issue_03.png.
This was verified on both vim 7.4 and 8.0.
This should be an upstream issue for the vim developers.
Thanks,
Jim