about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-06-29 09:14:22 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-06-29 09:17:38 -0700
commitd07a336131fb1b272fbf3d5590fdc5b78f7d78c8 (patch)
tree252c8dcee63a1bdfa26e70d0547b1459b018d584
parent8d3adfa36df54305589dd9d43084d1207edc04f1 (diff)
downloadtext.love-d07a336131fb1b272fbf3d5590fdc5b78f7d78c8.tar.gz
.
-rw-r--r--text.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/text.lua b/text.lua
index eb6c155..5e9e724 100644
--- a/text.lua
+++ b/text.lua
@@ -683,7 +683,7 @@ function Text.to_pos_on_line(line, mx, my)
       -- On all wrapped screen lines but the final one, clicks past end of
       -- line position cursor on final character of screen line.
       -- (The final screen line positions past end of screen line as always.)
-      if mx > Line_width and screen_line_index < #line.screen_line_starting_pos then
+      if screen_line_index < #line.screen_line_starting_pos and mx > Line_width then
 --?         print('past end of non-final line; return')
         return line.screen_line_starting_pos[screen_line_index+1]-1
       end