Eric Promislow wrote:
herbert breunung wrote:

   $self->{y}           = 0;
   $self->{lastxsearch} = -1;
   $self->{lastysearch} = 0;

it handles the Y as operator, so you get messed up highlight.

I've noticed that the first line is lexed correctly, but then
changes further down in the buffer can cause the 'y' to
be colored as if it's the start of a y command, instead of
a bareword.  Which tells me the code that is intended to
sync the lexer at a stable point in the buffer at the
start of Colourise() is not looking far enough back.

Yeah. In fact, for all of those quote-like delimiters, there is zero look-back at the moment, so they are always recognized as a start delimiter. Most of the look-backwards/forwards is for '/' and '<'. So a good algorithm for recognizing barewords is desirable. y is the most common such failure I've seen because it is frequently used as an x,y pair, but any solution should cater for all the types of quote-like delimiters. Another related failure case is "sub tr;". More of my thoughts in my reply to Herbert.

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to