From 86efac510aff8c9a453b577fe0c32147e2abbb7b Mon Sep 17 00:00:00 2001 From: moculus Date: Wed, 9 Apr 2008 21:55:03 +0000 Subject: [PATCH] --HG-- branch : pmacs2 --- mode/hex.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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: ")]