mirror of
https://github.com/haven1433/HexManiacAdvance.git
synced 2026-03-21 17:34:13 -05:00
handle linux newlines during paste
This commit is contained in:
parent
9c5fa427f9
commit
1fb8ac7924
|
|
@ -394,7 +394,7 @@ namespace HavenSoft.HexManiac.Core.ViewModels.Tools {
|
|||
if (start > end) (start, end) = (end, start);
|
||||
int length = end - start + 1;
|
||||
int originalLength = length;
|
||||
var code = thumb.Compile(model, start, out var newRuns, Content.Split(Environment.NewLine));
|
||||
var code = thumb.Compile(model, start, out var newRuns, Content.Split(new[] { Environment.NewLine, "\n" }, StringSplitOptions.None));
|
||||
|
||||
// if more length is needed and the next available bytes are free, allow it.
|
||||
while (code.Count > length && model.Count > start + length + 1 && model[start + length] == 0xFF && model[start + length + 1] == 0xFF) length += 2;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user