about summary refs log tree commit diff stats
path: root/edit.lua
diff options
context:
space:
mode:
Diffstat (limited to 'edit.lua')
-rw-r--r--edit.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/edit.lua b/edit.lua
index 87cf6c2..29f28d0 100644
--- a/edit.lua
+++ b/edit.lua
@@ -134,7 +134,7 @@ function edit.draw(State)
     local line = State.lines[line_index]
 --?     print('draw:', y, line_index, line)
     if y + State.line_height > App.screen.height then break end
-    State.screen_bottom1.line = line_index
+    State.screen_bottom1 = {line=line_index, pos=nil}
     if line.mode == 'text' then
 --?       print('text.draw', y, line_index)
       local startpos = 1
@@ -169,7 +169,6 @@ function edit.draw(State)
       assert(false)
     end
   end
---?   print('screen bottom: '..tostring(State.screen_bottom1.pos)..' in '..tostring(State.lines[State.screen_bottom1.line].data))
   if State.search_term then
     Text.draw_search_bar(State)
   end
@@ -331,7 +330,10 @@ function edit.keychord_pressed(State, chord, key)
     return
   elseif chord == 'C-f' then
     State.search_term = ''
-    State.search_backup = {cursor={line=State.cursor1.line, pos=State.cursor1.pos}, screen_top={line=State.screen_top1.line, pos=State.screen_top1.pos}}
+    State.search_backup = {
+      cursor={line=State.cursor1.line, pos=State.cursor1.pos},
+      screen_top={line=State.screen_top1.line, pos=State.screen_top1.pos},
+    }
     assert(State.search_text == nil)
   -- zoom
   elseif chord == 'C-=' then