Martijn Laan 11 月之前
父节点
当前提交
650515df48
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      Projects/Src/IDE.MainForm.pas

+ 3 - 3
Projects/Src/IDE.MainForm.pas

@@ -2918,12 +2918,12 @@ begin
   if SelectionCount > 1 then begin
     var RectangularPaste := False; {todo} { First check for the case Scintilla *does* support }
     if not RectangularPaste then begin
-      var PasteText := Clipboard.AsText.Replace(#13#10, #13).Split([#13, #10]);
-      if SelectionCount = Length(PasteText) then begin
+      var PasteLines := Clipboard.AsText.Replace(#13#10, #13).Split([#13, #10]);
+      if SelectionCount = Length(PasteLines) then begin
         for var I := 0 to SelectionCount-1 do begin
           var StartPos := AMemo.SelectionStartPosition[I]; { Can't use AMemo.GetSelections because each paste can update other selections }
           var EndPos := AMemo.SelectionEndPosition[I];
-          AMemo.ReplaceTextRange(StartPos, EndPos, PasteText[I], srmMinimal);
+          AMemo.ReplaceTextRange(StartPos, EndPos, PasteLines[I], srmMinimal);
           { Update the selection to an empty selection at the end of the inserted
             text, just like ReplaceMainSelText }
           var Pos := AMemo.Target.EndPos; { ReplaceTextRange updates the target }