From 477c6c11328477e9a339bee674990279948a7bbd Mon Sep 17 00:00:00 2001 From: Martijn Laan <1092369+martijnlaan@users.noreply.github.com> Date: Fri, 14 Jun 2024 07:01:39 +0200 Subject: [PATCH] Add comment. --- Projects/Src/CompForm.pas | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Projects/Src/CompForm.pas b/Projects/Src/CompForm.pas index 3bda350a5..0c6bccdd1 100644 --- a/Projects/Src/CompForm.pas +++ b/Projects/Src/CompForm.pas @@ -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; @@ -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