From c0e9af54a5382d5c60c40371f1ad641b449cb0c7 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Sun, 1 Dec 2024 20:34:48 -0500 Subject: [PATCH] Remove trailing newline when displaying decoded rlwinm info --- objdiff-gui/src/views/function_diff.rs | 2 +- objdiff-gui/src/views/rlwinm.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/objdiff-gui/src/views/function_diff.rs b/objdiff-gui/src/views/function_diff.rs index e93f5cc..f40858b 100644 --- a/objdiff-gui/src/views/function_diff.rs +++ b/objdiff-gui/src/views/function_diff.rs @@ -151,7 +151,7 @@ fn ins_hover_ui( } if let Some(demangled) = rlwinmdec::decode(&ins.formatted) { - ui.colored_label(appearance.highlight_color, &demangled); + ui.colored_label(appearance.highlight_color, demangled.trim()); } }); } diff --git a/objdiff-gui/src/views/rlwinm.rs b/objdiff-gui/src/views/rlwinm.rs index 08b9354..63b9ca5 100644 --- a/objdiff-gui/src/views/rlwinm.rs +++ b/objdiff-gui/src/views/rlwinm.rs @@ -19,7 +19,7 @@ pub fn rlwinm_decode_window( if let Some(demangled) = rlwinmdec::decode(&state.text) { ui.scope(|ui| { ui.style_mut().override_text_style = Some(TextStyle::Monospace); - ui.colored_label(appearance.replace_color, &demangled); + ui.colored_label(appearance.replace_color, demangled.trim()); }); if ui.button("Copy").clicked() { ui.output_mut(|output| output.copied_text = demangled);