Don't edit newlines in strings

This commit is contained in:
Benjamin Popp 2020-05-12 21:04:56 -05:00
parent 381eaeca3f
commit 3b44f9ce15

View File

@ -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 = ' ';