From 88013000fc0445496e1c51ee869a0c36088839e2 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 20 Jul 2022 07:50:33 -0700 Subject: . --- text.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'text.lua') diff --git a/text.lua b/text.lua index 39b73d8..5a9896f 100644 --- a/text.lua +++ b/text.lua @@ -757,6 +757,7 @@ end -- convert x pixel coordinate to pos -- oblivious to wrapping +-- result: 1 to len+1 function Text.nearest_cursor_pos(line, x, left) if x == 0 then return 1 @@ -798,6 +799,7 @@ end -- return the nearest index of line (in utf8 code points) which lies entirely -- within x pixels of the left margin +-- result: 0 to len+1 function Text.nearest_pos_less_than(line, x) --? print('', '-- nearest_pos_less_than', line, x) local len = utf8.len(line) -- cgit 1.4.1-2-gfad0