about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-05-19 05:50:33 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-05-19 05:50:33 -0700
commitf144bdfc20ac7dae422be4afcbfb51a720a3b05c (patch)
treebd3ae09a4a98ca6bb85b64ed4113f5e6944b8867
parentf69e17d35074d846136254f78f1b3e41b3897fa3 (diff)
downloadtext.love-f144bdfc20ac7dae422be4afcbfb51a720a3b05c.tar.gz
simpler
-rw-r--r--main.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.lua b/main.lua
index 5ba82fa..7b0a434 100644
--- a/main.lua
+++ b/main.lua
@@ -108,9 +108,9 @@ function love.draw()
   end
   local y = 0
   for line_index,line in ipairs(Lines) do
+    if y > Screen_height then break end
     if line_index >= Screen_top_line then
       y = math.floor(y+15*Zoom)
-      if y > Screen_height then break end
       Screen_bottom_line = line_index
       line.y = y
       if line.mode == 'text' and line.data == '' then