mirror of
https://github.com/haven1433/HexManiacAdvance.git
synced 2026-05-31 20:42:43 -05:00
improve 'got a crash' copied text
copy a number of lines that varies based on the number of tabs.
This commit is contained in:
parent
15d3b6d411
commit
0db2ce46e1
|
|
@ -92,7 +92,9 @@ namespace HavenSoft.HexManiac.WPF.Windows {
|
|||
text.AppendLine("-------------------------------------------");
|
||||
text.AppendLine(Environment.NewLine);
|
||||
File.AppendAllText("crash.log", text.ToString());
|
||||
var shortError = Environment.NewLine.Join(text.ToString().SplitLines().Take(20));
|
||||
var editor = DataContext as EditorViewModel;
|
||||
var tabCount = editor?.Count ?? 0;
|
||||
var shortError = Environment.NewLine.Join(text.ToString().SplitLines().Take(15 + tabCount * 5));
|
||||
shortError = Environment.NewLine.Join(new[] {
|
||||
$"~I got a crash! ({ViewModel.Singletons.MetadataInfo.VersionNumber})",
|
||||
"```",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user