diff --git a/mode/hex.py b/mode/hex.py index 58f1b79..db8d58a 100644 --- a/mode/hex.py +++ b/mode/hex.py @@ -31,6 +31,20 @@ class Hex(mode.Fundamental): else: self.del_binding(c) + def enable_line_numbers(self): + self.show_line_numbers = True + self.lmargin = 12 + def disable_line_numbers(self): + self.show_line_numbers = False + self.lmargin = 0 + def get_lmargin(self, y, x=0, ended=False, cont=False): + lm = self.lmargin + if ended: + s = ' -------- ' + elif x == 0: + s = '0x%08x ' % y + return (s, color.build('default', 'default', 'bold')) + class GotoWord(Method): '''Jump to the specified line number''' args = [Argument("wordno", type=type(0), prompt="Goto word: ")]