From 21c0b7a2508a2e30c10040ff0b58b28bc7311cd3 Mon Sep 17 00:00:00 2001 From: JianjunLiu Date: Fri, 28 Jul 2023 16:39:30 +0800 Subject: [PATCH] Update utslmemo.tsf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 编辑器错误判断 --- funcext/tvclib/utslmemo.tsf | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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