From bf5c733c1a55a9f01631410470c846cb8cd64feb Mon Sep 17 00:00:00 2001 From: Steven Cohn Date: Sun, 12 May 2024 09:53:58 -0400 Subject: [PATCH] push --- OneMore/Commands/Edit/CopyAsTextCommand.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OneMore/Commands/Edit/CopyAsTextCommand.cs b/OneMore/Commands/Edit/CopyAsTextCommand.cs index 6f8184c33a..bcf87f84a3 100644 --- a/OneMore/Commands/Edit/CopyAsTextCommand.cs +++ b/OneMore/Commands/Edit/CopyAsTextCommand.cs @@ -99,12 +99,15 @@ private void BuildText(bool all, XNamespace ns, XElement paragraph, StringBuilde } else { - if (runs[runs.Count - 1].Parent.NextNode is null) + if (runs[0].Parent.PreviousNode is null && + runs[runs.Count - 1].Parent.NextNode is null) { + // whole paragraph selected so treat as a paragrah with EOL builder.AppendLine(text); } else { + // partial paragraph selected so only grab selected runs builder.Append(text); } }