don't crash when zooming out forever

This commit is contained in:
Kartik K. Agaram 2023-04-17 22:34:50 -07:00
parent 34e180836d
commit fc0f2f27aa
1 changed files with 4 additions and 2 deletions

View File

@ -5,8 +5,10 @@ on.keychord_press = function(chord, key)
B()
elseif chord == 'C--' then
-- zoom out
Viewport.zoom = Viewport.zoom-0.1
B()
if Viewport.zoom > 0.1 then
Viewport.zoom = Viewport.zoom-0.1
B()
end
elseif chord == 'C-0' then
-- reset zoom
Viewport.zoom = 1.0