mirror of https://gitlab.com/basile.b/dexed.git
identifier renaming, reproduce DCD behavior at word edges
This commit is contained in:
parent
f2ec6823e9
commit
361e5728b8
|
@ -1015,12 +1015,15 @@ end;
|
||||||
procedure TCESynMemo.renameIdentifier;
|
procedure TCESynMemo.renameIdentifier;
|
||||||
var
|
var
|
||||||
locs: TIntOpenArray = nil;
|
locs: TIntOpenArray = nil;
|
||||||
old, idt: string;
|
old, idt, line: string;
|
||||||
i, j, loc: integer;
|
i, j, loc: integer;
|
||||||
c: char;
|
c: char;
|
||||||
begin
|
begin
|
||||||
if not DcdWrapper.available then
|
if not DcdWrapper.available then
|
||||||
exit;
|
exit;
|
||||||
|
line := lineText;
|
||||||
|
if (CaretX = 1) or not (line[LogicalCaretXY.X] in IdentChars) or
|
||||||
|
not (line[LogicalCaretXY.X-1] in IdentChars) then exit;
|
||||||
old := GetWordAtRowCol(LogicalCaretXY);
|
old := GetWordAtRowCol(LogicalCaretXY);
|
||||||
DcdWrapper.getLocalSymbolUsageFromCursor(locs);
|
DcdWrapper.getLocalSymbolUsageFromCursor(locs);
|
||||||
if length(locs) = 0 then
|
if length(locs) = 0 then
|
||||||
|
|
Loading…
Reference in New Issue