From 9d8a51808572af991bf7a2b6517010cbeca04bc5 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 15 Sep 2024 14:37:45 -0700 Subject: [PATCH] bugfix: up-arrow when cursor straddles a wrapping line We can have multiple rects corresponding to the same location. But only one of them has show_cursor enabled. This disambiguates which one we mean. With the current rect-based design, it's much harder to get 2 cursors than I thought. --- move.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/move.lua b/move.lua index b3794cc..1f23b2b 100644 --- a/move.lua +++ b/move.lua @@ -282,7 +282,7 @@ function edit.to_coord(editor, loc) -- scans -- text for _,s in ipairs(rect.screen_line_rects) do for _,c in ipairs(s.char_rects) do - if c.pos == loc.pos then + if c.pos == loc.pos and c.show_cursor then return editor.left + c.x, y + c.y end end