fix a crash
This one isn't worth debugging. We know how to recreate this data on demand.
This commit is contained in:
parent
f0e967d2a1
commit
f7afc61b22
4
text.lua
4
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
|
||||
|
|
Loading…
Reference in New Issue