[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sh-mode highlight issue
From: |
Thomas Dickey |
Subject: |
Re: sh-mode highlight issue |
Date: |
Sun, 30 Jan 2022 15:45:15 -0500 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Sat, Jan 29, 2022 at 04:09:09PM -0500, Thomas Dickey wrote:
> On Sat, Jan 29, 2022 at 07:51:53PM +0000, Wayne Cuddy via discussions
> concerning the vile text editor wrote:
> > I'm not sure if this has been reported before, please forgive me if
> > this is repetitious.
> >
> > I'm running 9.8t and have not had a chance to upgrade to the
> > latest/greatest yet but I don't see mention of this issue being
> > corrected in the changelog. The closest I could find was comments from
> > 9.7y:
> >
> > + improve vile-sh-filt for these cases:
> > + "${number}"
> > + "$(commands)"
> > + "$((expression))"
> > + "${name#value}", etc.
> >
> >
> > The issue concerns $((expression)) expansions in variable assignments,
> > but may not be limited to just this case.
> >
> > var="prefix$((5*5))suffix"
> ^ string
> ^expression
> ^ string?
> >
> > prefix appears correctly highlighted, suffix does not, it seems the
> > syntax highlighting terminates after the final ')' character.
>
> Just looking at the source, the line
>
> <EXPRS>{BACKTIC2_UP} { handle_backtic2(yytext, yyleng,
> LEN_BACKTIC2_DOWN, 0); }
>
> is probably what should trigger on the "))", which takes it into
>
> if (FLTSTACK_OK && (which <= 0) && (FLTSTACK_THIS.backtic == test)) {
>
> and fails there for some reason -- otherwise it would go back to the
> string/literal coloring.
>
> (I'm in the middle of ncurses, but may dig into it tomorrow to get a better
> answer).
See attached
--
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
ftp://ftp.invisible-island.net
diff
Description: Text document
signature.asc
Description: PGP signature