about summary refs log tree commit diff stats
path: root/text.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-08-19 16:27:38 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-08-19 16:27:38 -0700
commitcbd8f678d226170047405982e94751eeb71cc696 (patch)
treed3c66f003b369e27039effcb2a59896d77785589 /text.lua
parentfc9490c9647b7ac55b1e5d32ca446da9004b7446 (diff)
downloadlines.love-cbd8f678d226170047405982e94751eeb71cc696.tar.gz
fix a name
Diffstat (limited to 'text.lua')
-rw-r--r--text.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/text.lua b/text.lua
index 90a139c..6f76442 100644
--- a/text.lua
+++ b/text.lua
@@ -403,11 +403,11 @@ function Text.pagedown(State)
   -- If a line/paragraph gets to a page boundary, I often want to scroll
   -- before I get to the bottom.
   -- However, only do this if it makes forward progress.
-  local top2 = Text.to2(State, State.screen_bottom1)
-  if top2.screen_line > 1 then
-    top2.screen_line = math.max(top2.screen_line-10, 1)
+  local bot2 = Text.to2(State, State.screen_bottom1)
+  if bot2.screen_line > 1 then
+    bot2.screen_line = math.max(bot2.screen_line-10, 1)
   end
-  local new_top1 = Text.to1(State, top2)
+  local new_top1 = Text.to1(State, bot2)
   if Text.lt1(State.screen_top1, new_top1) then
     State.screen_top1 = new_top1
   else