Charly Dante
2014-02-16 16:04:31 UTC
Hi,
I implemented a custom lexer with folding and everything works perfectly
fine. However, if I add a keyword which is asociated with folding to the
very last line,
it isn't recognized as long as I add a newline. For example:
void foo () { // Second last line, fold flag is added correctly here
if () // Very last line, no fold header is added until one
enters a newline
I would like to have a consistent behavior here and add a fold header when
the user is typing in the last line of the document (even if it could not
fold anything).
I already found something in PerLine.cxx, but I'm not sure what I have to
change exactly to get this to work. I tried changing the if in the function
LineLevels::SetLevel
from *if ((line >= 0) && (line < lines))* to *if ((line >= 0) && (line <=
lines))* but that seems to cause bugs as when adding newlines then, the
folder isn't closed anymore
at the end of the last line but remains open (vertical line instead of
T-line).
How can I achieve the desired behavior?
Best Regards,
CD
I implemented a custom lexer with folding and everything works perfectly
fine. However, if I add a keyword which is asociated with folding to the
very last line,
it isn't recognized as long as I add a newline. For example:
void foo () { // Second last line, fold flag is added correctly here
if () // Very last line, no fold header is added until one
enters a newline
I would like to have a consistent behavior here and add a fold header when
the user is typing in the last line of the document (even if it could not
fold anything).
I already found something in PerLine.cxx, but I'm not sure what I have to
change exactly to get this to work. I tried changing the if in the function
LineLevels::SetLevel
from *if ((line >= 0) && (line < lines))* to *if ((line >= 0) && (line <=
lines))* but that seems to cause bugs as when adding newlines then, the
folder isn't closed anymore
at the end of the last line but remains open (vertical line instead of
T-line).
How can I achieve the desired behavior?
Best Regards,
CD
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.