FS#34523 - [vim] Shell syntax highlighting is broken since patch

Attached to Project: Arch Linux
Opened by Peter Wu (Lekensteyn) - Saturday, 30 March 2013, 11:28 GMT
Last edited by Anatol Pomozov (anatolik) - Thursday, 20 November 2014, 06:18 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Anatol Pomozov (anatolik)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The last vim upgrade broke syntax highlighting of certain shell scripts. An example of such script:

#!/bin/sh
foo=$(cmd --arg)
echo "$foo"

With 7.3.834-1, the syntax highlighting was fine. Since 7.3.875-1, the syntax highlighting was broken. Try it yourself:

vim -u /dev/null +'syntax on' foo.sh

I bisected (git-remote-hg :-) ) it to:
Author: Bram Moolenaar <bram@vim.org>
Date: Tue Mar 19 11:35:58 2013 +0100

Update runtime files.

This is a diff of the change to runtime/syntax/sh.vim
@@ -1,9 +1,10 @@
shArithmetic
shDeref
shDerefSimple
+shEcho
shEscape
shNumber
-shOperator
+shOption
shPosnParm
shExSingleQuote
shSingleQuote
@@ -16,4 +17,4 @@
shTest
shCtrlSeq
shSpecial
-shCmdParenRegio
+shCmdParenRegion

shOption causes the invalid syntax highlighting here. The attached patch makes the `--` option stop at the closing parenthese too (seriously, who uses `--)`) anyway? It is a syntax error). Applied on top of 3.7.875, current workaround is to copy the file from /usr/share/vim/vim73/syntax/sh.vim into ~/.vim/syntax/sh.vim and apply the patch.

This is probably an upstream bug, but I am not comfortable with subscribing to their mailing list just to post this single patch.
This task depends upon

Closed by  Anatol Pomozov (anatolik)
Thursday, 20 November 2014, 06:18 GMT
Reason for closing:  Upstream
Additional comments about closing:  upstream bug says it is fixed
Comment by Thomas Dziedzic (tomd123) - Sunday, 31 March 2013, 05:16 GMT
If you don't want to subscribe, vim has a bug tracker here: https://code.google.com/p/vim/issues/list
I would like this to get submitted upstream.
Comment by Peter Wu (Lekensteyn) - Sunday, 31 March 2013, 09:41 GMT
Reported at https://code.google.com/p/vim/issues/detail?id=126

Thanks, I forgot about that possibility.
Comment by Thomas Dziedzic (tomd123) - Saturday, 18 May 2013, 13:53 GMT
Changing this to upstream. I will wait until upstream fixes this bug instead of applying this patch since the issue is very minor.
Comment by Thomas Dziedzic (tomd123) - Wednesday, 29 May 2013, 03:07 GMT
As much as it sucks to have to sign up to the ml for this sole purpose, you might want to sign up to vim_dev and post this patch since it seems their bug tracker isn't as responsive.

Loading...