Ecere Software
/
sdk
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
275c579
)
ecere/gui/EditBox: Clearing Undo buffer on setting contents
author
Jerome St-Louis
<jerome@ecere.com>
Sat, 22 Oct 2016 14:05:59 +0000
(10:05 -0400)
committer
Jerome St-Louis
<jerome@ecere.com>
Sat, 22 Oct 2016 14:05:59 +0000
(10:05 -0400)
- Added Clear() method to UndoBuffer
ecere/src/gui/controls/EditBox.ec
patch
|
blob
|
history
diff --git
a/ecere/src/gui/controls/EditBox.ec
b/ecere/src/gui/controls/EditBox.ec
index
a811a1b
..
05816d5
100644
(file)
--- a/
ecere/src/gui/controls/EditBox.ec
+++ b/
ecere/src/gui/controls/EditBox.ec
@@
-298,6
+298,15
@@
public:
else
delete action;
}
+
+ void Clear()
+ {
+ actions.Free();
+ actions.size = 8;
+ count = 0;
+ curAction = 0;
+ firstEvent = true;
+ }
};
static class AddCharAction : UndoAction
@@
-816,6
+825,8
@@
public:
{
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);