better hex mode

--HG--
branch : pmacs2
This commit is contained in:
moculus 2008-10-13 05:34:59 +00:00
parent e65626904e
commit 17220dc14d
1 changed files with 4 additions and 0 deletions

View File

@ -20,12 +20,16 @@ class HexSetByteOrder(Method):
class HexForward(Method): class HexForward(Method):
def _execute(self, w, **vargs): def _execute(self, w, **vargs):
w.forward() w.forward()
if w.mode.symbolic_edit:
w.forward()
end = w.buffer.get_buffer_end() end = w.buffer.get_buffer_end()
while w.cursor_char().isspace() and w.cursor < end: while w.cursor_char().isspace() and w.cursor < end:
w.forward() w.forward()
class HexBackward(Method): class HexBackward(Method):
def _execute(self, w, **vargs): def _execute(self, w, **vargs):
w.backward() w.backward()
if w.mode.symbolic_edit:
w.backward()
start = w.buffer.get_buffer_start() start = w.buffer.get_buffer_start()
while w.cursor_char().isspace() and w.cursor > start: while w.cursor_char().isspace() and w.cursor > start:
w.backward() w.backward()