Debugger / Trace Logger: Clean up newline handling in Copy code (newline may not be 2 characters on different platforms).
This commit is contained in:
parent
a1dcd9928e
commit
b3ecd5dd28
|
@ -182,13 +182,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
var blob = new StringBuilder();
|
var blob = new StringBuilder();
|
||||||
foreach (int index in indices)
|
foreach (int index in indices)
|
||||||
{
|
{
|
||||||
|
if (blob.Length != 0) blob.AppendLine();
|
||||||
blob.Append(DisassemblyLines[index].Address)
|
blob.Append(DisassemblyLines[index].Address)
|
||||||
.Append(" ")
|
.Append(" ")
|
||||||
.Append(DisassemblyLines[index].Mnemonic)
|
.Append(DisassemblyLines[index].Mnemonic);
|
||||||
.AppendLine();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
blob.Remove(blob.Length - 2, 2); // Lazy way to not have a line break at the end
|
|
||||||
Clipboard.SetDataObject(blob.ToString());
|
Clipboard.SetDataObject(blob.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -231,12 +231,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
var blob = new StringBuilder();
|
var blob = new StringBuilder();
|
||||||
foreach (int index in indices)
|
foreach (int index in indices)
|
||||||
{
|
{
|
||||||
blob.AppendLine(_instructions[index]
|
if (blob.Length != 0) blob.AppendLine();
|
||||||
|
blob.Append(_instructions[index]
|
||||||
.Replace("\r", string.Empty)
|
.Replace("\r", string.Empty)
|
||||||
.Replace("\n", string.Empty) );
|
.Replace("\n", string.Empty) );
|
||||||
}
|
}
|
||||||
|
|
||||||
blob.Remove(blob.Length - 2, 2); // Lazy way to not have a line break at the end
|
|
||||||
Clipboard.SetDataObject(blob.ToString());
|
Clipboard.SetDataObject(blob.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue