diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-05-17 20:51:39 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-05-17 20:52:00 -0700 |
commit | 91ce333ae0f617ef4eb6638faf66bbe159f25a0d (patch) | |
tree | 21eb9291c80b7c58663676da2bd5d4f350a57c03 | |
parent | 476bbcdadf5bf1980398e1ee9af0e7251e25367f (diff) | |
download | text.love-91ce333ae0f617ef4eb6638faf66bbe159f25a0d.tar.gz |
bugfix typo
-rw-r--r-- | main.lua | 2 | ||||
-rw-r--r-- | manual_tests | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/main.lua b/main.lua index 17b92b4..3ef933c 100644 --- a/main.lua +++ b/main.lua @@ -160,7 +160,7 @@ function love.mousepressed(x,y, button) for line_index,line in ipairs(Lines) do if line.mode == 'text' then -- move cursor - if x >= 16 and y >= line.y and y < y+15*Zoom then + if x >= 16 and y >= line.y and y < line.y+15*Zoom then Cursor_line = line_index Cursor_pos = Text.nearest_cursor_pos(line.data, x, 1) end diff --git a/manual_tests b/manual_tests index 87740c8..2790f39 100644 --- a/manual_tests +++ b/manual_tests @@ -1,6 +1,8 @@ file load: cursor_line = 1 first line is a drawing -> cursor_line = 2 +click on text -> cursor moves +click on drawing -> cursor doesn't move create drawing -> cursor bumps down below drawing backspace cursor_pos == 0, previous line is a drawing -> delete drawing, cursor still visible at start of line |