From eb128e3eccdec64ef87dfe81f267bd179f148685 Mon Sep 17 00:00:00 2001 From: Paul Liverman III Date: Wed, 26 Jul 2017 23:10:29 -0700 Subject: [PATCH] fixed some derpy stuff and implemented lower bounds on depth and step size --- piefiller.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/piefiller.lua b/piefiller.lua index 62b1df2..292f68a 100644 --- a/piefiller.lua +++ b/piefiller.lua @@ -74,8 +74,8 @@ function piefiller:new(settings) reset = "r", increase_depth = "down", decrease_depth = "up", - increase_step_size = "-", - decrease_step_size = "=", + increase_step_size = "=", + decrease_step_size = "-", shorten_names = "z", show_hidden = "h", save_to_file = "e", @@ -342,13 +342,17 @@ function piefiller:keypressed(key) self.depth = self.depth + 1 elseif command == "decrease_depth" then self:reset() - self.depth = self.depth - 1 + if self.depth > 1 then + self.depth = self.depth - 1 + end elseif command == "increase_step_size" then self:reset() - self.step = self.step - 1 + self.step = self.step + 1 elseif command == "decrease_step_size" then self:reset() - self.step = self.step +1 + if self.step > 0 then + self.step = self.step - 1 + end elseif command == "shorten_names" then self.small = not self.small elseif command == "show_hidden" then