From f7afc61b225e3e9e72da312de9a9cca1d4284688 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 6 Jun 2022 18:57:46 -0700 Subject: fix a crash This one isn't worth debugging. We know how to recreate this data on demand. --- text.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'text.lua') 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 -- cgit 1.4.1-2-gfad0