Skip to content

Commit

Permalink
Comment tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnlaan committed Oct 11, 2024
1 parent a959c5a commit c5cf362
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Projects/Src/IDE.MainForm.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2910,9 +2910,9 @@ function TMainForm.MultipleSelectionPaste(const AMemo: TIDEScintEdit): Boolean;
begin
{ Scintilla doesn't yet properly support multiple selection paste. Handle it
here, VSCode style: if there's multiple selections and the paste text has the
same amount of lines then paste 1 line per selection. Otherwise do nothing
to allow Scintilla's default behaviour (which is to paste all lines into
each selection if SC_MULTIPASTE_EACH is on). }
same amount of lines then paste 1 line per selection. Otherwise paste all lines
into each selection. For the latter we don't need handling here: this is
Scintilla's default behaviour if SC_MULTIPASTE_EACH is on. }
Result := False;
var SelectionCount := AMemo.SelectionCount;
if SelectionCount > 1 then begin
Expand All @@ -2926,7 +2926,7 @@ function TMainForm.MultipleSelectionPaste(const AMemo: TIDEScintEdit): Boolean;
AMemo.ReplaceTextRange(StartPos, EndPos, PasteText[I], srmMinimal);
{ Update the selection to an empty selection at the end of the inserted
text, just like SCI_REPLACESEL }
var Pos := AMemo.Target.EndPos; { SCI_REPLACETARGET* updates the target }
var Pos := AMemo.Target.EndPos; { ReplaceTextRange updates the target }
AMemo.SelectionCaretPosition[I] := Pos;
AMemo.SelectionAnchorPosition[I] := Pos;
end;
Expand Down

0 comments on commit c5cf362

Please sign in to comment.