else
delete action;
}
+
+ void Clear()
+ {
+ actions.Free();
+ actions.size = 8;
+ count = 0;
+ curAction = 0;
+ firstEvent = true;
+ }
};
static class AddCharAction : UndoAction
{
if(this)
{
+ undoBuffer.Clear();
+
undoBuffer.dontRecord++;
Deselect();
DelCh(this.lines.first, 0, 0, this.lines.last, this.lineCount-1, ((EditLine)(this.lines.last)).count, true);
th = space.h;
}
else
+ {
surface.TextExtent2(buffer, line.count, &tw, &th, 0, null, &oh);
+ tw += countTabsExtraSpaces(buffer, tabSize, 0, line.count) * space.w;
+ }
}
else if(line == selStartLine)
{
- int prevGlyph;
+ int prevGlyph = 0;
int start = Min(line.count, selStartX);
int end = Min(line.count, selEndX);
surface.TextExtent2(buffer, start, &tw, &th, 0, &prevGlyph, null);