Skip to content

Commit

Permalink
Show status offset and selection in dec and hexa (#486)
Browse files Browse the repository at this point in the history
* Show status offset and selection in dec and hexa

Show status offset and selection count in decimal and hexadecimal as '0d.../0x...'

* Remove the uncommon 0d prefixes
  • Loading branch information
jogo- authored Feb 8, 2024
1 parent 0fd1014 commit e125331
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/statusSelectionCount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ export default class StatusSelectionCount extends Disposable {
const nFocus = focused !== undefined ? numberFormat.format(focused) : undefined;
const nSelected = selected > 1 ? numberFormat.format(selected) : undefined;
if (nFocus && nSelected) {
this.item.text = vscode.l10n.t("Byte {0} ({1} selected)", nFocus, nSelected);
this.item.text = vscode.l10n.t("Byte {0}/0x{1} ({2}/0x{3} selected)", nFocus, nFocus.toString(16).toUpperCase(), nSelected, nSelected.toString(16).toUpperCase());
} else if (nSelected) {
this.item.text = vscode.l10n.t("{0} selected", nSelected);
this.item.text = vscode.l10n.t("{0}/0x{1} selected", nSelected, nSelected.toString(16).toUpperCase());
} else if (nFocus) {
this.item.text = vscode.l10n.t("Byte {0}", nFocus);
this.item.text = vscode.l10n.t("Byte {0}/0x{1}", nFocus, nFocus.toString(16).toUpperCase());
} else {
this.item.hide();
return;
Expand Down

0 comments on commit e125331

Please sign in to comment.