Update utslmemo.tsf
编辑器错误判断
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user