Update utslmemo.tsf

编辑器错误判断
This commit is contained in:
JianjunLiu 2023-07-28 16:39:30 +08:00
parent acce2fc884
commit 21c0b7a250
1 changed files with 9 additions and 5 deletions

View File

@ -1202,7 +1202,11 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) //
if fUndoList.CanUndo then if fUndoList.CanUndo then
begin begin
lk := new tcountlocker(ftmemlockv); lk := new tcountlocker(ftmemlockv);
try
UndoItem(); UndoItem();
except
ClearUndo();
end
end end
end end
function Redo(); function Redo();
@ -1210,7 +1214,11 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) //
if fRedoList.CanUndo then if fRedoList.CanUndo then
begin begin
lk := new tcountlocker(ftmemlockv); lk := new tcountlocker(ftmemlockv);
RedoItem(); try
RedoItem();
except
ClearUndo();
end
end end
end end
function CharInput(c);virtual;//²åÈë×Ö·û function CharInput(c);virtual;//²åÈë×Ö·û
@ -2365,11 +2373,7 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) //
if not s then return ""; if not s then return "";
bg := min(bb[1],ee[1]); bg := min(bb[1],ee[1]);
ed := max(bb[1],ee[1]); ed := max(bb[1],ee[1]);
try
if bg<ed then return s[bg:(ed-1)]; //2023078 ³ö´í if bg<ed then return s[bg:(ed-1)]; //2023078 ³ö´í
except
end
return ""; return "";
{if ee[1]>bb[1]and ee[1]>1 then {if ee[1]>bb[1]and ee[1]>1 then
try try