summaryrefslogtreecommitdiff
path: root/dalos-hexview.lua
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2009-12-19 20:45:08 -0800
committerPixel <pixel@nobis-crew.org>2009-12-19 20:45:08 -0800
commit7f80551cc6dc74fe6cc2af1b6b107fc88d9ab5dc (patch)
tree48d234ade15d4e6068383ddfaf400aa1e9c24a31 /dalos-hexview.lua
parentde77b17f6a1ec46f9e9386e604d138152108e708 (diff)
Disabling hexview's output if cursor is past filesize.
Diffstat (limited to 'dalos-hexview.lua')
-rw-r--r--dalos-hexview.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/dalos-hexview.lua b/dalos-hexview.lua
index b085f12..f14e1e0 100644
--- a/dalos-hexview.lua
+++ b/dalos-hexview.lua
@@ -40,14 +40,18 @@ dalosp.hexview = {
update_houtput = function (self, ind, cursor)
local h = self:get_linked_input(1)
+ local maxsixe = h:getsize()
if h and self.watchees[ind] then
+ if cursor < maxsize then
+ self:set_houtput(nil, ind)
+ end
local obj = {
h = h,
hvo = self,
ind = ind,
origin = cursor,
offset = 0,
- size = h:getsize() - cursor,
+ size = maxsize - cursor,
canread = function (self) return true end,
canwrite = function (self) return false end,
canseek = function (self) return true end,