John Little wrote:
This is a regression, the syntax/sh.vim from 2019-06-16 does not show this problem.

The maintainer of this syntax script has his own version numbering, and if you want to report problems he usually will first ask that you try the latest script from his web site, which is version 190. It has the problem.  The version on github is 189, dated 2019-10-16.  Version 188, which I have from the Ubuntu 20.04 repository, does not show the problem. (Neither do versions 125, 133, or 179, which I had lying around.)

I see the problem.  As you can easily check, putting a space right before the backslash fixes the highlighting.  From syntax highlighting's perspective:

* something preceded by an even number of backslashes should not be escaped (and thus be normally highlighted) * something preceded by an odd number of backslashes should be escaped (and thus highlighted with special highlighting)

However, in this case the backslash is preceded by the double-quote which starts a string region.  The attempt to check for an odd/even number of backslashes fails, and thus the backquote is recognized incorrectly as beginning an in-string command rather than being escaped.  Not checking for that even/odd number of backslashes is obviously going to cause bad highlighting.  I need some way to check that a pattern is beginning with a backslash in a region, and thus can do without the odd-even preceding context checking.  I've asked Bram for something like a "startgroup=..." expression (similar to nextgroup=...) wherein I could do just that.

We'll see what happens...
Chip Campbell

--
--
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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/05f04cbe-4d07-db26-901e-4138a1f36594%40drchip.org.

Raspunde prin e-mail lui