From 8690f36eb36021188e6a1a2c6a39d0b34d234f51 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 31 Jul 2022 16:08:00 +0200 Subject: [PATCH] CrashReporter: Turn off line wrapping in the various text editors It's much nicer to look at a backtrace when it has one line per stack frame instead of a random number of lines. --- Userland/Applications/CrashReporter/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Userland/Applications/CrashReporter/main.cpp b/Userland/Applications/CrashReporter/main.cpp index e185503f5c..c439a68e83 100644 --- a/Userland/Applications/CrashReporter/main.cpp +++ b/Userland/Applications/CrashReporter/main.cpp @@ -245,6 +245,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto environment_text_editor = TRY(environment_tab->try_add()); environment_text_editor->set_text(String::join('\n', environment)); environment_text_editor->set_mode(GUI::TextEditor::Mode::ReadOnly); + environment_text_editor->set_wrapping_mode(GUI::TextEditor::WrappingMode::NoWrap); environment_text_editor->set_should_hide_unnecessary_scrollbars(true); auto memory_regions_tab = TRY(tab_widget.try_add_tab("Memory Regions")); @@ -254,6 +255,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto memory_regions_text_editor = TRY(memory_regions_tab->try_add()); memory_regions_text_editor->set_text(String::join('\n', memory_regions)); memory_regions_text_editor->set_mode(GUI::TextEditor::Mode::ReadOnly); + memory_regions_text_editor->set_wrapping_mode(GUI::TextEditor::WrappingMode::NoWrap); memory_regions_text_editor->set_should_hide_unnecessary_scrollbars(true); memory_regions_text_editor->set_visualize_trailing_whitespace(false); @@ -317,6 +319,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto backtrace_text_editor = MUST(container->template try_add()); backtrace_text_editor->set_text(backtrace.text); backtrace_text_editor->set_mode(GUI::TextEditor::Mode::ReadOnly); + backtrace_text_editor->set_wrapping_mode(GUI::TextEditor::WrappingMode::NoWrap); backtrace_text_editor->set_should_hide_unnecessary_scrollbars(true); full_backtrace.appendff("==== {} ====\n{}\n", backtrace.title, backtrace.text); } @@ -328,6 +331,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto cpu_registers_text_editor = MUST(container->template try_add()); cpu_registers_text_editor->set_text(cpu_registers.text); cpu_registers_text_editor->set_mode(GUI::TextEditor::Mode::ReadOnly); + cpu_registers_text_editor->set_wrapping_mode(GUI::TextEditor::WrappingMode::NoWrap); cpu_registers_text_editor->set_should_hide_unnecessary_scrollbars(true); }