mirror of https://gitlab.com/basile.b/dexed.git
editor, local renaming, maintain caret pos
This commit is contained in:
parent
3428a0f567
commit
af5c39689f
|
@ -1373,10 +1373,12 @@ var
|
||||||
locs: TIntOpenArray = nil;
|
locs: TIntOpenArray = nil;
|
||||||
old, idt, line: string;
|
old, idt, line: string;
|
||||||
i, j, loc: integer;
|
i, j, loc: integer;
|
||||||
|
p: TPoint;
|
||||||
c: char;
|
c: char;
|
||||||
begin
|
begin
|
||||||
if not DcdWrapper.available then
|
if not DcdWrapper.available then
|
||||||
exit;
|
exit;
|
||||||
|
p := CaretXY;
|
||||||
line := lineText;
|
line := lineText;
|
||||||
if (CaretX = 1) or not (line[LogicalCaretXY.X] in IdentChars) or
|
if (CaretX = 1) or not (line[LogicalCaretXY.X] in IdentChars) or
|
||||||
not (line[LogicalCaretXY.X-1] in IdentChars) then exit;
|
not (line[LogicalCaretXY.X-1] in IdentChars) then exit;
|
||||||
|
@ -1405,6 +1407,7 @@ begin
|
||||||
for c in idt do
|
for c in idt do
|
||||||
ExecuteCommand(ecChar, c, nil);
|
ExecuteCommand(ecChar, c, nil);
|
||||||
EndUndoBlock;
|
EndUndoBlock;
|
||||||
|
CaretXY := p;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue