diff --git a/src/ui/bigtext/bigtext.py b/src/ui/bigtext/bigtext.py index e9b7b80..fcb4e8a 100644 --- a/src/ui/bigtext/bigtext.py +++ b/src/ui/bigtext/bigtext.py @@ -454,10 +454,13 @@ class InnerBigText(QWidget): self.highlight_selected_text.set_query("") def _update_status_bar(self, start_byte: int, end_byte: int): - bytes_human_readable = humanbytes(end_byte - start_byte) - PluginRegistry.execute("update_status_bar", - _("selected {0} - {1:,.0f}:{2:,.0f}").format(bytes_human_readable, start_byte, - end_byte - 1)) + if end_byte - start_byte > 0: + bytes_human_readable = humanbytes(end_byte - start_byte) + PluginRegistry.execute("update_status_bar", + _("selected {0} - {1:,.0f}:{2:,.0f}").format(bytes_human_readable, start_byte, + end_byte - 1)) + else: + PluginRegistry.execute("update_status_bar", _("")) def _file_changed(self): if self._follow_tail: