aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-04-13 11:42:02 -0400
committerJesse Luehrs <doy@tozt.net>2014-04-13 11:42:02 -0400
commitf46625c7c24edb3782855315b0b1e2e022d39f2b (patch)
treeb30bb614a9ba7ed5da4cf38444c7d906db369f8c
parent6bdd1f37f63b3c2579c05d208d8f6cae73c2533f (diff)
downloadrunes-f46625c7c24edb3782855315b0b1e2e022d39f2b.tar.gz
runes-f46625c7c24edb3782855315b0b1e2e022d39f2b.zip
fix underlining
-rw-r--r--display.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/display.c b/display.c
index ce17276..46314a1 100644
--- a/display.c
+++ b/display.c
@@ -141,9 +141,8 @@ void runes_display_show_string(RunesTerm *t, char *buf, size_t len)
if (t->font_underline) {
cairo_save(t->cr);
cairo_set_line_width(t->cr, 1);
- cairo_move_to(
- t->cr, x - (fontx * strlen(buf)), y - ascent + fonty - 0.5);
- cairo_line_to(t->cr, x, y - ascent + fonty - 0.5);
+ cairo_move_to(t->cr, x, y - ascent + fonty - 0.5);
+ cairo_line_to(t->cr, x + (fontx * len), y - ascent + fonty - 0.5);
cairo_stroke(t->cr);
cairo_restore(t->cr);