Armel Asselin:

> so another solution: scintilla could send an event such as
> SC_MOD_BEGINUNDOACTION which would be sent whenever a new Action object is
> issued in UndoHistory::AppendAction and does not overwrite the previous
> "startAction" on top of the stack. It would be as well sent in the
> UndoHistory::BeginUndoAction.
> does it seem rational to anyone? how can i send notifications from there?

   CellBuffer doesn't know about the outside world so can't send
notifications. There could be a call to see if an action was
coalesced: either return an extra status from InsertString and
DeleteChars or expose an action ID that could be compared to see if
this was performed then an extra bit SC_ACTION_COALESCED in the
notification. Or invert it to be SC_START_ACTION

   This may be the wrong way to look at things though. Possibly, you
just need a mechanism to break CellBuffer coalescing when you add an
action to your undo stack.  There is currently no explicit call for
this but I think BeginUndoAction(); EndUndoAction() may work.

   Yet another approach would be to expose some form of action ID to
the outside world so that you could save the action ID at the point
you perform an outside action. There are issues with the form of
action ID and its lifetime that would have to be worked through.

   Neil

_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to