From abcc18002bf036ab01115447cabb9321767c71fb Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 8 Jul 2022 15:45:45 -0700 Subject: add args to some functions - Text.to_pos_on_line --- text.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'text.lua') diff --git a/text.lua b/text.lua index dbf1604..2ac62ec 100644 --- a/text.lua +++ b/text.lua @@ -672,8 +672,7 @@ function Text.in_line(line, x,y, left,right) end -- convert mx,my in pixels to schema-1 coordinates -function Text.to_pos_on_line(line, mx, my) ---? print('Text.to_pos_on_line', mx, my, 'width', App.screen.width-Margin_right) +function Text.to_pos_on_line(line, mx, my, left, right) if line.fragments == nil then Text.compute_fragments(line) end @@ -948,7 +947,7 @@ function Text.tweak_screen_top_and_cursor(left, right) local line = Lines[Screen_bottom1.line] Cursor1 = { line=Screen_bottom1.line, - pos=Text.to_pos_on_line(line, App.screen.width-5, App.screen.height-5), + pos=Text.to_pos_on_line(line, App.screen.width-5, App.screen.height-5, left, right), } end end -- cgit 1.4.1-2-gfad0