about summary refs log tree commit diff stats
path: root/text.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-07-08 15:45:45 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-07-08 15:45:45 -0700
commitabcc18002bf036ab01115447cabb9321767c71fb (patch)
tree847286fd7ae6187782a40d94dfcc8fd61d975f15 /text.lua
parent9fb8f25030de2f9eff87003a1ff71e3bc5fdbc94 (diff)
downloadlines.love-abcc18002bf036ab01115447cabb9321767c71fb.tar.gz
add args to some functions
  - Text.to_pos_on_line
Diffstat (limited to 'text.lua')
-rw-r--r--text.lua5
1 files changed, 2 insertions, 3 deletions
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