integer editor: fix radix prefix

This commit is contained in:
Michael Sippel 2023-08-21 14:00:03 +02:00
parent 5417ca1b12
commit b40992e001
Signed by: senvas
GPG key ID: F96CF119C34B64A6

View file

@ -48,6 +48,7 @@ impl ObjCommander for DigitEditor {
self.msg.clear(); self.msg.clear();
if self.ctx.read().unwrap().meta_chars.contains(&c) { if self.ctx.read().unwrap().meta_chars.contains(&c) {
eprintln!("digitedit: meta char");
return TreeNavResult::Exit; return TreeNavResult::Exit;
} else if c.to_digit(self.radix).is_none() { } else if c.to_digit(self.radix).is_none() {
@ -163,7 +164,9 @@ impl PosIntEditor {
PTYListStyle::for_node( &mut node, PTYListStyle::for_node( &mut node,
( (
match radix { match radix {
2 => "0d".into(), 2 => "0b".into(),
8 => "0o".into(),
10 => "0d".into(),
16 => "0x".into(), 16 => "0x".into(),
_ => "".into() _ => "".into()
}, },