identifier renaming, reproduce DCD behavior at word edges

This commit is contained in:
Basile Burg 2016-05-04 23:52:06 +02:00
parent f2ec6823e9
commit 361e5728b8
1 changed files with 4 additions and 1 deletions

View File

@ -1015,12 +1015,15 @@ end;
procedure TCESynMemo.renameIdentifier;
var
locs: TIntOpenArray = nil;
old, idt: string;
old, idt, line: string;
i, j, loc: integer;
c: char;
begin
if not DcdWrapper.available then
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);
DcdWrapper.getLocalSymbolUsageFromCursor(locs);
if length(locs) = 0 then