--HG--
branch : pmacs2
This commit is contained in:
moculus 2008-04-10 15:44:26 +00:00
parent b2a8497c7b
commit 5c0beaf55b
1 changed files with 4 additions and 1 deletions

View File

@ -53,10 +53,13 @@ class Hex(mode.Fundamental):
i = self.window.buffer.cursorx_to_datax(cx) i = self.window.buffer.cursorx_to_datax(cx)
if i is None: if i is None:
return ((0, s, color.build('green', 'default', 'bold')),) return ((0, s, color.build('green', 'default', 'bold')),)
else: elif i < len(s) - 1:
return ((0, s[0:i], color.build('green', 'default', 'bold')), return ((0, s[0:i], color.build('green', 'default', 'bold')),
(i, s[i], color.build('default', 'default', 'bold', 'reverse')), (i, s[i], color.build('default', 'default', 'bold', 'reverse')),
(i + 1, s[i+1:], color.build('green', 'default', 'bold'))) (i + 1, s[i+1:], color.build('green', 'default', 'bold')))
else:
return ((0, s[0:i], color.build('green', 'default', 'bold')),
(i, s[i], color.build('default', 'default', 'bold', 'reverse')))
else: else:
return ((0, s, color.build('green', 'default', 'bold')),) return ((0, s, color.build('green', 'default', 'bold')),)