Skip to content

Commit

Permalink
Add comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnlaan committed Jun 14, 2024
1 parent 7b80773 commit 477c6c1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Projects/Src/CompForm.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2529,6 +2529,10 @@ procedure TCompileForm.ESelectAllOccurrencesClick(Sender: TObject);

procedure TCompileForm.ESelectNextOccurrenceClick(Sender: TObject);
begin
{ Currently this always uses GetWordOccurrenceFindOptions but ideally it would
know whether this is the 'first' SelectNext or not. Then, if first it would
do what SelectAll does to choose a FindOptions. And if next it would reuse
that. This is what VSCode does. }
FActiveMemo.SelectNextOccurrence(GetWordOccurrenceFindOptions);
end;

Expand Down Expand Up @@ -2802,6 +2806,16 @@ procedure TCompileForm.HDocClick(Sender: TObject);
procedure TCompileForm.MemoKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Key = VK_RIGHT then begin
var Memo := Sender as TScintEdit;
if (Memo.Call(SCI_GETSELECTIONMODE, 0, 0) = SC_SEL_RECTANGLE) or
(Memo.Call(SCI_GETSELECTIONMODE, 0, 0) = SC_SEL_THIN) then begin
//'Enable Column Selection to Multi-editing';
Memo.Call(SCI_SETSELECTIONMODE, SC_SEL_STREAM, 0);
Memo.Call(SCI_SETSELECTIONMODE, SC_SEL_STREAM, 0);
end;
end;

if Key = VK_F1 then begin
var HelpFile := GetHelpFile;
if Assigned(HtmlHelp) then begin
Expand Down

0 comments on commit 477c6c1

Please sign in to comment.