Skip to content

Commit de57c26

Browse files
committed
Cleanup.
1 parent 292c0d9 commit de57c26

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Components/ScintEdit.pas

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,8 @@ TScintEdit = class(TWinControl)
369369
function TestRawRegularExpression(const S: TScintRawString): Boolean;
370370
procedure Undo;
371371
procedure UpdateStyleAttributes;
372-
function WordAtCursor: String;
373-
function WordAtCursorRange: TScintRange;
372+
function WordAtCaret: String;
373+
function WordAtCaretRange: TScintRange;
374374
procedure ZoomIn;
375375
procedure ZoomOut;
376376
property AutoCompleteActive: Boolean read GetAutoCompleteActive;
@@ -2483,13 +2483,13 @@ procedure TScintEdit.UpdateStyleAttributes;
24832483
Call(SCI_AUTOCSETSTYLE, 0, 0);
24842484
end;
24852485

2486-
function TScintEdit.WordAtCursor: String;
2486+
function TScintEdit.WordAtCaret: String;
24872487
begin
2488-
var Range := WordAtCursorRange;
2488+
var Range := WordAtCaretRange;
24892489
Result := GetTextRange(Range.StartPos, Range.EndPos);
24902490
end;
24912491

2492-
function TScintEdit.WordAtCursorRange: TScintRange;
2492+
function TScintEdit.WordAtCaretRange: TScintRange;
24932493
begin
24942494
var Pos := GetCaretPosition;
24952495
Result.StartPos := GetWordStartPosition(Pos, True);

Projects/Src/IDE.MainForm.pas

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,7 +1451,7 @@ procedure TMainForm.MemoKeyDown(Sender: TObject; var Key: Word;
14511451
var HelpFile := GetHelpFile;
14521452
if Assigned(HtmlHelp) then begin
14531453
HtmlHelp(GetDesktopWindow, PChar(HelpFile), HH_DISPLAY_TOPIC, 0);
1454-
var S := FActiveMemo.WordAtCursor;
1454+
var S := FActiveMemo.WordAtCaret;
14551455
if S <> '' then begin
14561456
var KLink: THH_AKLINK;
14571457
FillChar(KLink, SizeOf(KLink), 0);
@@ -2998,7 +2998,7 @@ procedure TMainForm.ESelectAllOccurrencesClick(Sender: TObject);
29982998
if FActiveMemo.SelEmpty then begin
29992999
{ If the selection is empty then SelectAllOccurrences will actually just select
30003000
the word at caret which is not what we want, so preselect this word ourselves }
3001-
var Range := FActiveMemo.WordAtCursorRange;
3001+
var Range := FActiveMemo.WordAtCaretRange;
30023002
if Range.StartPos <> Range.EndPos then
30033003
FActiveMemo.SetSingleSelection(Range.EndPos, Range.StartPos);
30043004
end;
@@ -4017,7 +4017,7 @@ procedure TMainForm.UpdateOccurrenceIndicators(const AMemo: TIDEScintEdit);
40174017
Selections := TScintRangeList.Create;
40184018

40194019
if FOptions.HighlightWordAtCursorOccurrences and (AMemo.CaretVirtualSpace = 0) and MainSelSingleLine then begin
4020-
var Word := AMemo.WordAtCursorRange;
4020+
var Word := AMemo.WordAtCaretRange;
40214021
if (Word.StartPos <> Word.EndPos) and MainSelection.Within(Word) then begin
40224022
var TextToIndicate := AMemo.GetRawTextRange(Word.StartPos, Word.EndPos);
40234023
AMemo.GetSelections(Selections); { Gets any additional selections as well }

0 commit comments

Comments
 (0)