about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-05-17 20:51:39 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-05-17 20:52:00 -0700
commit91ce333ae0f617ef4eb6638faf66bbe159f25a0d (patch)
tree21eb9291c80b7c58663676da2bd5d4f350a57c03
parent476bbcdadf5bf1980398e1ee9af0e7251e25367f (diff)
downloadtext.love-91ce333ae0f617ef4eb6638faf66bbe159f25a0d.tar.gz
bugfix typo
-rw-r--r--main.lua2
-rw-r--r--manual_tests2
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
/gbmor/getwtxt/commit/go.sum?h=v0.2.2&id=db3ecebbc2d131f9bd6a8d47e39dcecf785183e5'>db3eceb ^
efa99ed ^
db3eceb ^










efa99ed ^
db3eceb ^
2421e96 ^

db3eceb ^


2421e96 ^




db3eceb ^



efa99ed ^
db3eceb ^
2421e96 ^




db3eceb ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72