Re: vile source links

2022-10-23 Thread Wayne Cuddy via discussions concerning the vile text editor
On Fri, Oct 21, 2022 at 07:42:01PM -0400, Thomas Dickey wrote:
> On Fri, Oct 21, 2022 at 06:20:40PM +0000, Wayne Cuddy via discussions 
> concerning the vile text editor wrote:
> > On the vile download page:
> > 
> > https://www.invisible-island.net/vile/vile.html#download
> > 
> > The links for the source downloads:
> > 
> > https://www.invisible-island.net/archives/vile/vile.tar.gz
> > 
> > https://www.invisible-island.net/datafiles/release/vile.tar.gz
> > 
> > These both seem to point to the older 9.8 release instead of 9.8w. Is
> > this intentional?
> 
> sort of (the versioning with letter suffixes seems to be acceptable to
> everyone -- though I recall quite a while ago a packager refusing to
> do anything with vile unless it ended ".0" -- and I've seen no real
> need recently for a "stable release").
> 
> "current" is where you should look:
> 
> https://invisible-island.net/datafiles/current/vile.tar.gz
> https://invisible-island.net/archives/vile/current/vile.tar.gz
> https://invisible-island.net/archives/vile/current/
>

I totally ignored those links for some reason. Perhaps because they are
suffixed with (for installers).

I'll make a note of that.

Thanks.



vile source links

2022-10-21 Thread Wayne Cuddy via discussions concerning the vile text editor
On the vile download page:

https://www.invisible-island.net/vile/vile.html#download

The links for the source downloads:

https://www.invisible-island.net/archives/vile/vile.tar.gz

https://www.invisible-island.net/datafiles/release/vile.tar.gz

These both seem to point to the older 9.8 release instead of 9.8w. Is
this intentional?

Should I be using another link to access to latest source?



Re: sh-mode highlight issue

2022-01-31 Thread Wayne Cuddy via discussions concerning the vile text editor
On Sun, Jan 30, 2022 at 03:45:15PM -0500, Thomas Dickey wrote:
> 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
> > 
> > {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 
> https://invisible-island.net
> ftp://ftp.invisible-island.net

> --- sh-filt.l 2021/12/12 01:26:53 1.183
> +++ sh-filt.l 2022/01/30 20:27:01
> @@ -70,6 +70,7 @@
>  static void handle_backtic2(const char *text, int length, int test, int 
> which);
>  static void handle_backtic1(const char *text, int length, int test, int 
> which);
>  static void handle_parens(const char *text, int length, int test, int which, 
> int state);
> +static void resume_state(void);
>  static void save_here(const char *text, int length);
>  static void write_vname(const char *text, int length);
>  
> @@ -198,8 +199,10 @@
>   FLEX_PRINTF((stderr, "cannot pop '$((' level %d\n", 
> stk_level));
>   if (!pop_backtic1(yytext, 1, LEN_BACKTIC1_DOWN)) {
> FLEX_PRINTF((stderr, "cannot pop '$(' level 
> %d\n", stk_level));
> -   if (FLTSTACK_OK && stk_state[stk_level-1].state 
> == NORMAL)
> +   if (FLTSTACK_OK && stk_state[stk_level-1].state 
> == NORMAL) {
>   pop_state();
> + resume_state();
> +   }
> flt_putc(R_PAREN);
>   }
>   unput(R_PAREN);
> @@ -213,8 +216,10 @@
>   }
>  {BACKTIC1_UP}{ if (!pop_backtic1(yytext, yyleng, 
> LEN_BACKTIC1_DOWN)) {
>   FLEX_PRINTF((stderr, "cannot pop '$(' level %d\n", 
> stk_level));
> - if (FLTSTACK_OK && stk_state[stk_level-1].state == 
> NORMAL)
> + if (FLTSTACK_OK && stk_state[stk_level-1].state == 
> NORMAL) {
> pop_state();
> +   resume_state();
> + }
>   ECHO;
> }
>   }
> @@ -293,6 +298,7 @@
>  "))"   {
> WriteToken(Action_attr); 
> pop_state();
> +   resume_state();
>   }
>  {IDENT1}   |
>  {VNAME}{ WriteToken(Ident_attr); }
> @@ -312,6 +318,7 @@
> flt_bfr_append("'", 1);
> flt_bfr_finish();
> pop_state();
> +   resume_state();
>   }
>  \\[0-7]{1,3}  {
> flt_bfr_embed(yytext, 1, Action_attr);
> @@ -874,6 +881,7 @@
>   flt_bfr_append(value + used, length - used);
>   flt_bfr_finish();
>   pop_state();
> + resume_state();
>   FreeAndNull(here_tag);
>   here_exp = 0;
>   here_next = 0;

I'll make time to upgrade and test this patch later this week and post
the results.

Many thanks as usual, 
Wayne



sh-mode highlight issue

2022-01-29 Thread Wayne Cuddy via discussions concerning the vile text editor
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"

prefix appears correctly highlighted, suffix does not, it seems the
syntax highlighting terminates after the final ')' character.

Wayne