Browse Source

* avoid considering grouped action if StoreUnfo is false

pierre 23 years ago
parent
commit
a42b826a06
1 changed files with 6 additions and 1 deletions
  1. 6 1
      ide/wcedit.pas

+ 6 - 1
ide/wcedit.pas

@@ -726,6 +726,7 @@ end;
 
 
 procedure TCodeEditorCore.AddGroupedAction(AAction : byte);
 procedure TCodeEditorCore.AddGroupedAction(AAction : byte);
 begin
 begin
+  if (UndoList=nil) or (not StoreUndo) then Exit;
   if Assigned(UndoList^.CurrentGroupedAction) then
   if Assigned(UndoList^.CurrentGroupedAction) then
     inc(UndoList^.GroupLevel)
     inc(UndoList^.GroupLevel)
   else
   else
@@ -737,6 +738,7 @@ end;
 
 
 procedure TCodeEditorCore.CloseGroupedAction(AAction : byte);
 procedure TCodeEditorCore.CloseGroupedAction(AAction : byte);
 begin
 begin
+  if (UndoList=nil) or (not StoreUndo) then Exit;
   dec(UndoList^.GroupLevel);
   dec(UndoList^.GroupLevel);
   if UndoList^.GroupLevel=0 then
   if UndoList^.GroupLevel=0 then
     begin
     begin
@@ -2044,7 +2046,10 @@ end;
 END.
 END.
 {
 {
  $Log$
  $Log$
- Revision 1.8  2002-04-16 08:27:01  pierre
+ Revision 1.9  2002-04-20 20:27:44  pierre
+  * avoid considering grouped action if StoreUnfo is false
+
+ Revision 1.8  2002/04/16 08:27:01  pierre
   * fix for bug report 1869
   * fix for bug report 1869
 
 
  Revision 1.7  2002/01/25 14:15:35  pierre
  Revision 1.7  2002/01/25 14:15:35  pierre