]> git.mdlowis.com Git - projs/tide.git/commitdiff
Fixed highlighting of selection for lines that contain tab characters
authorMichael D. Lowis <mike@mdlowis.com>
Thu, 17 Nov 2016 00:13:10 +0000 (19:13 -0500)
committerMichael D. Lowis <mike@mdlowis.com>
Thu, 17 Nov 2016 00:13:10 +0000 (19:13 -0500)
libx/x11.c
xedit

index af194e6d05597c1d2e8e24f2aa8ad1f54e16b47b..385f898c153d3acaea518eff2782869fb30e271d 100644 (file)
@@ -366,7 +366,8 @@ void x11_draw_glyphs(int fg, int bg, XGlyphSpec* specs, size_t nspecs) {
         int w = extent.xOff;
         int h = (font->height - font->descent);
         xftcolor(&bgc, Config->palette[bg]);
-        x11_draw_rect(bg, specs[0].x, specs[0].y - h, nspecs * w, font->height);
+        size_t width = specs[nspecs-1].x - specs[0].x + w;
+        x11_draw_rect(bg, specs[0].x, specs[0].y - h, width, font->height);
         XftColorFree(X.display, X.visual, X.colormap, &bgc);
     }
     xftcolor(&fgc, Config->palette[fg]);
diff --git a/xedit b/xedit
index e660043f2f6b923bb845f830daa46802c0ee1dc6..e298f02102728ffb2405147563b43142811c32fe 100755 (executable)
Binary files a/xedit and b/xedit differ