scintilla.BeginUndoAction(); scintilla.InsertText("Hello World"); scintilla.EndUndoAction();
scintilla.BeginUndoAction(); scintilla.DeleteBack(); scintilla.InsertText("Hello World"); scintilla.EndUndoAction();This code deletes the character before the current position of the caret, inserts the text "Hello World", and groups these actions using the BeginUndoAction method. If another action is performed after this, the three actions can be undone together as a single action. In summary, the ScintillaControl.BeginUndoAction method is a useful function for grouping undo actions in the ScintillaNET package library in C#.