Neil Hodgson wrote:
Robert Roessler:
Well, it looks easy/safe enough to slightly modify
Editor::MovePositionOutsideChar() so that after checking IsProtected()
an additional check is made for the presence of an indicator with a
style like INDIC_HIDDEN (or a new one for this purpose); if there,
then it would mean "valid positioning point".
Styles are set on bytes, positions such as the caret are between
bytes. You could say INDIC_HIDDENBREAK indicates a valid caret
position before or after a byte so marked but it is not so clean.
Cool - I will make the minimal changes to try out INDIC_HIDDENBREAK -
with the semantics that the position *before* is valid for the caret
(this seems most compatible with expectations).
Now, to set my protected styles (without needing the lexer to do any
more than preserve the high style bit):
The app can control the reading of files, and [re]style the lines with
magic comment sequences.
The app can insert and [re]style lines with magic comment sequences.
If the user types an otherwise magic comment sequence, it will just be
treated as a normal comment(?).
If the user does an Undo after the app has inserted a magic comment
sequence, it is removed (no problem).
BUT, if the user does an Undo followed by a Redo, I have problems -
how to get the protected versions of the styles applied? Since I am
blocked from receiving the [e.g.,] SC_MOD_CHANGESTYLE and restyling
magic comment sequences SYNCHRONOUSLY, I am in a bad spot (I think).
So I *could* wipe the Undo stack (setting a Save Point is the
equivalent for my app) right after "officially" inserting one or more
of the magic sequences... no Undo to worry about! Is this reasonable,
or too extreme?
Robert Roessler
[EMAIL PROTECTED]
http://www.rftp.com
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest