Update utslmemo.tsf
编辑器错误判断
This commit is contained in:
@@ -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 bg<ed then return s[bg:(ed-1)]; //2023078 出错
|
||||
except
|
||||
|
||||
end
|
||||
return "";
|
||||
{if ee[1]>bb[1]and ee[1]>1 then
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user