Browse Source

* fix for Backspace Undo

pierre 25 years ago
parent
commit
bc59550b33
1 changed files with 10 additions and 3 deletions
  1. 10 3
      ide/text/weditor.pas

+ 10 - 3
ide/text/weditor.pas

@@ -4593,7 +4593,11 @@ begin
           S:=GetStr(pa^.text);
           S:=GetStr(pa^.text);
           if S<>'' then
           if S<>'' then
            DisposeStr(pa^.text);
            DisposeStr(pa^.text);
-          pa^.text:=NewStr(S+AText);
+          if (AAction=eaDeleteText) and
+             (AStartPos.X>AEndPos.X) then
+            pa^.text:=NewStr(AText+S)
+          else
+            pa^.text:=NewStr(S+AText);
           ActionIntegrated:=true;
           ActionIntegrated:=true;
         end;
         end;
     end;
     end;
@@ -5517,7 +5521,10 @@ end;
 END.
 END.
 {
 {
   $Log$
   $Log$
-  Revision 1.75  2000-01-14 15:36:42  pierre
+  Revision 1.76  2000-01-25 00:12:23  pierre
+   * fix for Backspace Undo
+
+  Revision 1.75  2000/01/14 15:36:42  pierre
    + GetShortFileName used for tcodeeditor file opening
    + GetShortFileName used for tcodeeditor file opening
 
 
   Revision 1.74  2000/01/10 23:20:04  pierre
   Revision 1.74  2000/01/10 23:20:04  pierre
@@ -5860,4 +5867,4 @@ END.
     + options are now written/read
     + options are now written/read
     + find and replace routines
     + find and replace routines
 
 
-}
+}