about summary refs log tree commit diff stats
path: root/text.lua
diff options
context:
space:
mode:
Diffstat (limited to 'text.lua')
-rw-r--r--text.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/text.lua b/text.lua
index d4bfbc2..fa7b0ea 100644
--- a/text.lua
+++ b/text.lua
@@ -9,12 +9,13 @@ require 'text_tests'
 -- return values:
 --  y coordinate drawn until in px
 --  position of start of final screen line drawn
-function Text.draw(State, line, line_index, top)
+function Text.draw(State, line_index)
 --?   print('text.draw', line_index)
   App.color(Text_color)
+  local line = State.lines[line_index]
   -- wrap long lines
   local x = State.left
-  local y = top
+  local y = line.starty
   local pos = 1
   local screen_line_starting_pos = 1
   if line.fragments == nil then