summaryrefslogtreecommitdiff
path: root/iupe-hexview-toolbox.lua
diff options
context:
space:
mode:
Diffstat (limited to 'iupe-hexview-toolbox.lua')
-rw-r--r--iupe-hexview-toolbox.lua7
1 files changed, 3 insertions, 4 deletions
diff --git a/iupe-hexview-toolbox.lua b/iupe-hexview-toolbox.lua
index 7cfb7a4..fdb2638 100644
--- a/iupe-hexview-toolbox.lua
+++ b/iupe-hexview-toolbox.lua
@@ -22,7 +22,7 @@ iupep.hexview_toolbox = {
return r + 0, markercolors[rcursor]
end,
- hexview_cb = function (self, hexview)
+ hexview_cb = function (self, hexview, reset)
local filecursor = hexview.filecursor
local filesize = hexview.filesize
local fcl = self.cursors.file
@@ -34,7 +34,7 @@ iupep.hexview_toolbox = {
local cursor, bgcolor = self:getcursor(hexview)
local oldcursor = self.oldcursor + 0
- if oldcursor == cursor or cursor == -1 then return iup.DEFAULT end
+ if not reset and (oldcursor == cursor or cursor == -1) then return iup.DEFAULT end
self.oldcursor = cursor
local cl = self.cursors.normal
cl.dec.title = cursor
@@ -242,8 +242,7 @@ iupep.hexview_toolbox = {
end
function endianess:action(text, pos, state)
- r.oldcursor = -1
- r:hexview_cb(hexview)
+ r:hexview_cb(hexview, true)
end
cursorlabel_dec.action = function (self) return iupep.hexview_toolbox.cursor_change(self, hexview, r, false) end