about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-08-19 16:30:38 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-08-19 16:30:38 -0700
commit8d4346f3a8b4eac81d20da02900141cd1a6eadec (patch)
tree09c0c768df6a9f5f861e67448aaeca66d085da39
parent0c7bc1812da4d77392db4675dfbe0f87d0794d70 (diff)
parentcbd8f678d226170047405982e94751eeb71cc696 (diff)
downloadtext.love-8d4346f3a8b4eac81d20da02900141cd1a6eadec.tar.gz
Merge lines.love
-rw-r--r--app.lua2
-rw-r--r--text.lua8
2 files changed, 6 insertions, 4 deletions
diff --git a/app.lua b/app.lua
index 4ff1166..ddc175d 100644
--- a/app.lua
+++ b/app.lua
@@ -341,6 +341,8 @@ function App.disable_tests()
   end
 
   -- test methods are disallowed outside tests
+  App.run_tests = nil
+  App.disable_tests = nil
   App.screen.init = nil
   App.filesystem = nil
   App.time = nil
diff --git a/text.lua b/text.lua
index 377efb3..0e79e8d 100644
--- a/text.lua
+++ b/text.lua
@@ -390,11 +390,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