Commit 4d1f6af329d8c0aff4e62ee3fd5cf44c8ea57fa6

Omar Polo 2022-06-17T08:51:16

account for the vborder in draw_commit the vborder is drawn on top of the window and that can cause issues with double-width characters. Instead, account for it when computing the space available for the log message. ok stsp@

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/tog/tog.c b/tog/tog.c
index 4a079e6..253f99f 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -1542,6 +1542,8 @@ draw_commit(struct tog_view *view, struct got_commit_object *commit,
 	if (newline)
 		*newline = '\0';
 	limit = avail - col;
+	if (view->child && limit > 0)
+		limit--;	/* for the border */
 	err = format_line(&wlogmsg, &logmsg_width, &scrollx, logmsg, view->x,
 	    limit, col, 1);
 	if (err)