about summary refs log tree commit diff stats
path: root/main.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-05-20 22:18:39 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-05-20 22:18:39 -0700
commite420245ee316f540ed968877c929e2630d2a849c (patch)
treed3e8298c9d4f038309bd15b169c091acce619ddc /main.lua
parente3dc4c330b3d78aa2f1a360ce931974ef7b277d1 (diff)
downloadtext.love-e420245ee316f540ed968877c929e2630d2a849c.tar.gz
keep cursor on screen when pressing 'down'
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.lua b/main.lua
index 1bbd7f7..63f80e3 100644
--- a/main.lua
+++ b/main.lua
@@ -111,7 +111,7 @@ function love.draw()
   end
   local y = 15
   for line_index,line in ipairs(Lines) do
-    if y > Screen_height then break end
+    if y + math.floor(15*Zoom) > Screen_height then break end
     if line_index >= Screen_top_line then
       Screen_bottom_line = line_index
       if line.mode == 'text' and line.data == '' then