Using the ScriptCodeEdit I notice that the modified lines show up in the Gutter even when replacing a character. i.e. No “real” change has occurred, but it still goes yellow.
- Am I missing something or is there any plan to make the modification detection smarter?
- How can I reset the modification state? i.e. I’ve “saved” the text
Thanks, Rob
I tried resetting by
_syntaxEdit.Gutter.Options &= ~GutterOptions.PaintLineModificators;
_syntaxEdit.Gutter.Options |= GutterOptions.PaintLineModificators;
to no avail.
Hi Rob,
The appearance of line modification markers is based on the information present in the undo buffer.
Here are couple of examples:
syntaxEdit1.Modified = false; // this marks all previous modifications in undo buffer as saved ones (and display them in a different color)
The following code clears undo buffer and remove all line modification markers:
syntaxEdit1.Source.BeginUpdate();
try
{
syntaxEdit1.Source.ClearUndo();
syntaxEdit1.Source.ClearRedo();
syntaxEdit1.Source.State |= NotifyState.ModifiedChanged;
}
finally
{
syntaxEdit1.Source.EndUpdate();
}
Not sure if I understand your question regarding character replacing, could you please clarify?
Regards,
Dmitry
1 Like
Sorry for not responding, but your examples did help me. Thanks.
1 Like