ecere/gui/EditBox: Fixed apparent leak on setting contents (#934)
authorJerome St-Louis <jerome@ecere.com>
Mon, 10 Jun 2013 22:27:08 +0000 (18:27 -0400)
committerJerome St-Louis <jerome@ecere.com>
Tue, 11 Jun 2013 00:11:21 +0000 (20:11 -0400)
ecere/src/gui/controls/EditBox.ec

index 4203842..ee05aea 100644 (file)
@@ -776,6 +776,7 @@ public:
       {
          if(this)
          {
+            undoBuffer.dontRecord++;
             Deselect();
             DelCh(this.lines.first, 0, 0, this.lines.last, this.lineCount-1, ((EditLine)(this.lines.last)).count, true);
             if(value)
@@ -783,6 +784,7 @@ public:
             //SetViewToCursor(true);
             UpdateDirty();
             Home();
+            undoBuffer.dontRecord--;
          }
       }
 
@@ -5337,6 +5339,7 @@ public:
    {
       if(this)
       {
+         undoBuffer.dontRecord++;
          Deselect();
          DelCh(this.lines.first, 0, 0, this.lines.last, this.lineCount-1, ((EditLine)(this.lines.last)).count, true);
          if(format)
@@ -5352,6 +5355,7 @@ public:
          }
          UpdateDirty();
          Home();
+         undoBuffer.dontRecord--;
       }
    }