Skip to content

Commit 477c6c1

Browse files
committed
Add comment.
1 parent 7b80773 commit 477c6c1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Projects/Src/CompForm.pas

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2529,6 +2529,10 @@ procedure TCompileForm.ESelectAllOccurrencesClick(Sender: TObject);
25292529

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

@@ -2802,6 +2806,16 @@ procedure TCompileForm.HDocClick(Sender: TObject);
28022806
procedure TCompileForm.MemoKeyDown(Sender: TObject; var Key: Word;
28032807
Shift: TShiftState);
28042808
begin
2809+
if Key = VK_RIGHT then begin
2810+
var Memo := Sender as TScintEdit;
2811+
if (Memo.Call(SCI_GETSELECTIONMODE, 0, 0) = SC_SEL_RECTANGLE) or
2812+
(Memo.Call(SCI_GETSELECTIONMODE, 0, 0) = SC_SEL_THIN) then begin
2813+
//'Enable Column Selection to Multi-editing';
2814+
Memo.Call(SCI_SETSELECTIONMODE, SC_SEL_STREAM, 0);
2815+
Memo.Call(SCI_SETSELECTIONMODE, SC_SEL_STREAM, 0);
2816+
end;
2817+
end;
2818+
28052819
if Key = VK_F1 then begin
28062820
var HelpFile := GetHelpFile;
28072821
if Assigned(HtmlHelp) then begin

0 commit comments

Comments
 (0)