about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--text.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/text.lua b/text.lua
index 27900c8..3b910e9 100644
--- a/text.lua
+++ b/text.lua
@@ -674,7 +674,9 @@ function Text.to_pos_on_line(line, mx, my)
   if line.screen_line_starting_pos == nil then
     return Text.nearest_cursor_pos(line.data, mx)
   end
-  assert(line.fragments)
+  if line.fragments == nil then
+    Text.compute_fragments(line, Line_width)
+  end
   assert(my >= line.y)
   -- duplicate some logic from Text.draw
   local y = line.y
9.0b1&id=2c5ea01dd2003f172bdc5afdb8bb8bf34eccf0fa'>2c5ea01d ^
94c5d83e ^

2c5ea01d ^














94c5d83e ^



1295513f ^
94c5d83e ^
e9e4b4ff ^







94c5d83e ^







76f8d548 ^



94c5d83e ^


423ce88a ^

94c5d83e ^








e9e4b4ff ^

50a0cb1c ^
e9e4b4ff ^

26aa5c8e ^
e9e4b4ff ^
fde932f2 ^
75682d43 ^
e9e4b4ff ^

2c5ea01d ^
e9e4b4ff ^




e9e4b4ff ^

2c5ea01d ^
e9e4b4ff ^
0c2c782d ^

30ae2137 ^
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92