about summary refs log tree commit diff stats
path: root/edit.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-07-12 16:08:24 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-07-12 16:20:20 -0700
commit3874f325f8e1c71c067ed4dd3e9caa6fc3a254fc (patch)
tree92c96ea4c882702dd92a3a2cd780c991b35bfd4d /edit.lua
parent92ad99853e8a38aa62e2246e372505ed0d1aff09 (diff)
downloadtext.love-3874f325f8e1c71c067ed4dd3e9caa6fc3a254fc.tar.gz
add state arg to some functions
  - Text.draw
  - Text.draw_cursor
  - Text.draw_search_bar
Diffstat (limited to 'edit.lua')
-rw-r--r--edit.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/edit.lua b/edit.lua
index 86eacd5..f3e1f26 100644
--- a/edit.lua
+++ b/edit.lua
@@ -144,7 +144,7 @@ function edit.draw(State)
       })
       if State.search_term == nil then
         if line_index == State.cursor1.line then
-          Text.draw_cursor(State.margin_left, y)
+          Text.draw_cursor(State, State.margin_left, y)
         end
       end
       State.screen_bottom1.pos = State.screen_top1.pos
@@ -161,7 +161,7 @@ function edit.draw(State)
         line.startpos = State.screen_top1.pos
       end
 --?       print('text.draw', y, line_index)
-      y, State.screen_bottom1.pos = Text.draw(line, line_index, line.starty, State.margin_left, App.screen.width-State.margin_right)
+      y, State.screen_bottom1.pos = Text.draw(State, line, line_index, line.starty, State.margin_left, App.screen.width-State.margin_right)
       y = y + State.line_height
 --?       print('=> y', y)
     end
@@ -171,7 +171,7 @@ function edit.draw(State)
   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()
+    Text.draw_search_bar(State)
   end
 end