From 5d5fe7679504fb8ad1ceff443410fb42176894cf Mon Sep 17 00:00:00 2001 From: Bakkeby Date: Thu, 27 Feb 2025 21:57:48 +0100 Subject: [PATCH] dynamic cursor color: visual bug on selection ref. #169 --- x.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/x.c b/x.c index dde2900..1d5d1e9 100644 --- a/x.c +++ b/x.c @@ -2747,21 +2747,19 @@ xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og) XRenderColor colbg; #endif // DYNAMIC_CURSOR_COLOR_PATCH - #if !DYNAMIC_CURSOR_COLOR_PATCH || SELECTION_COLORS_PATCH - /* remove the old cursor */ + #if LIGATURES_PATCH + /* Redraw the line where cursor was previously. + * It will restore the ligatures broken by the cursor. */ + xdrawline(line, 0, oy, len); + #else + /* Remove the old cursor */ if (selected(ox, oy)) #if SELECTION_COLORS_PATCH og.mode |= ATTR_SELECTED; #else og.mode ^= ATTR_REVERSE; #endif // SELECTION_COLORS_PATCH - #endif // DYNAMIC_CURSOR_COLOR_PATCH - #if LIGATURES_PATCH - /* Redraw the line where cursor was previously. - * It will restore the ligatures broken by the cursor. */ - xdrawline(line, 0, oy, len); - #else xdrawglyph(og, ox, oy); #endif // LIGATURES_PATCH