Add config option to limit which string literal encodings are used (#356)

* Fix annoying rust-analyzer error with a cfg

* Refactor literal info into a struct

* Add field hide a literal from the GUI but still use for diffing

* Add config option to limit string literal diffing

* Fix deprecation warning `float_literal_f32_fallback`

* Hide non-preferred string encodings from the GUI

* Fix new cargo check warning

* Clippy again

* Rename "None" -> "Auto"
This commit is contained in:
LagoLunatic
2026-05-31 23:23:10 -04:00
committed by GitHub
parent 13f1267eac
commit 8b1b4a9a79
11 changed files with 193 additions and 65 deletions
+1 -1
View File
@@ -94,7 +94,7 @@ impl FrameHistory {
let rect = rect.shrink(4.0);
let color = ui.visuals().text_color();
let line_stroke = Stroke::new(1.0, color);
let line_stroke = Stroke::new(1.0_f32, color);
if let Some(pointer_pos) = response.hover_pos() {
let y = pointer_pos.y;
+7 -2
View File
@@ -97,7 +97,7 @@ fn ins_hover_ui(
ui.scope(|ui| {
ui.style_mut().override_text_style = Some(egui::TextStyle::Monospace);
ui.style_mut().wrap_mode = Some(egui::TextWrapMode::Wrap);
hover_items_ui(ui, instruction_hover(obj, resolved, &ins), appearance);
hover_items_ui(ui, instruction_hover(obj, resolved, &ins, diff_config), appearance);
});
}
@@ -128,7 +128,12 @@ fn ins_context_menu(
ui.scope(|ui| {
ui.style_mut().override_text_style = Some(egui::TextStyle::Monospace);
ui.style_mut().wrap_mode = Some(egui::TextWrapMode::Truncate);
context_menu_items_ui(ui, instruction_context(obj, resolved, &ins), column, appearance);
context_menu_items_ui(
ui,
instruction_context(obj, resolved, &ins, diff_config),
column,
appearance,
);
});
}