ui: Improved byte selection text

This commit is contained in:
WerWolv
2022-06-30 11:29:20 +02:00
parent 3efdc02fed
commit 034cc0cd2f
2 changed files with 8 additions and 3 deletions

View File

@@ -967,7 +967,7 @@ namespace hex::plugin::builtin {
auto selection = this->getSelection();
std::string value;
if (this->isSelectionValid())
value = hex::format("0x{0:08X} - 0x{1:08X} ({0} - {1}) ({2} {3})", selection.getStartAddress(), selection.getEndAddress(), selection.getSize(), selection.getSize() == 1 ? "Byte" : "Bytes");
value = hex::format("0x{0:08X} - 0x{1:08X} ({2})", selection.getStartAddress(), selection.getEndAddress(), hex::toByteString(selection.getSize()));
else
value = std::string("hex.builtin.view.hex_editor.selection.none"_lang);