From 3b44f9ce15bd79affac3aa47e8099ce3188802e3 Mon Sep 17 00:00:00 2001 From: Benjamin Popp Date: Tue, 12 May 2020 21:04:56 -0500 Subject: [PATCH] Don't edit newlines in strings --- src/HexManiac.Core/ViewModels/ViewPort.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/HexManiac.Core/ViewModels/ViewPort.cs b/src/HexManiac.Core/ViewModels/ViewPort.cs index 580591d6..d1395f03 100644 --- a/src/HexManiac.Core/ViewModels/ViewPort.cs +++ b/src/HexManiac.Core/ViewModels/ViewPort.cs @@ -1470,6 +1470,7 @@ namespace HavenSoft.HexManiac.Core.ViewModels { if (input.IsAny('\r', '\n')) { input = ' '; // handle multiline pasting by just treating the newlines as standard whitespace. withinComment = false; + if (element.Format is PCS || element.Format is ErrorPCS) return; // exit early: newlines within strings are ignored, because they're escaped. } if (element.Format is UnderEdit && input == ',') input = ' ';