diff --git a/funcext/tvclib/utslmemo.tsf b/funcext/tvclib/utslmemo.tsf index ff58344..f7ca287 100644 --- a/funcext/tvclib/utslmemo.tsf +++ b/funcext/tvclib/utslmemo.tsf @@ -1202,7 +1202,11 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) // if fUndoList.CanUndo then begin lk := new tcountlocker(ftmemlockv); + try UndoItem(); + except + ClearUndo(); + end end end function Redo(); @@ -1210,7 +1214,11 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) // if fRedoList.CanUndo then begin lk := new tcountlocker(ftmemlockv); - RedoItem(); + try + RedoItem(); + except + ClearUndo(); + end end end function CharInput(c);virtual;//²åÈë×Ö·û @@ -2365,11 +2373,7 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) // if not s then return ""; bg := min(bb[1],ee[1]); ed := max(bb[1],ee[1]); - try if bgbb[1]and ee[1]>1 then try