From 3874f325f8e1c71c067ed4dd3e9caa6fc3a254fc Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 12 Jul 2022 16:08:24 -0700 Subject: add state arg to some functions - Text.draw - Text.draw_cursor - Text.draw_search_bar --- edit.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'edit.lua') 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 -- cgit 1.4.1-2-gfad0