Re: [code] [scintillua] folder improvements

From: Mitchell <m.att.foicica.com>
Date: Thu, 15 Mar 2012 10:15:03 -0400 (EDT)

Tymur,

On Wed, 14 Mar 2012, Tymur Gubayev wrote:

> So, after some hours of debugging the folder (and that's not that
> easy...) I have 2 questions:
>
> 1. Why is on every char added/deleted the text is processed in 2
> chunks: current and next line is the first chunk, and the whole
> document after next line is 2nd chunk. I don't understand the purpose
> of this 2nd chunk if nothing has been changed in folding of 1st one.

This would be a question for the Scintilla mailing list[1] since Scintilla
determines what to send to a lexer Fold function. I can only imagine that
it is to ensure folding level integrity.

> 2. What is this code in LexLPeg.cxx, lines 495-497, supposed to do:
> // Mask off the level number, leaving only the previous flags.
> int flagsNext = styler.LevelAt(maxline + 1) & ~SC_FOLDLEVELNUMBERMASK;
> styler.SetLevel(maxline + 1, maxlevel | flagsNext);

Honestly I don't know. I took it from the tutorial here[2] and it appears
in other lexers so I presume this is standard practice. This is probably
another question for the Scintilla list.

[1]: http://groups.google.com/group/scintilla-interest
[2]: http://scintilla.org/Lexer.txt

Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Thu 15 Mar 2012 - 10:15:03 EDT

This archive was generated by hypermail 2.2.0 : Fri 16 Mar 2012 - 06:53:35 EDT