commit - 3785c9e59d01b1954a7478be06382ca98f097bb4
commit + fcfb26c37e218d01b0cfb8b960b7b186f9ee285e
blob - 7dce0c320b49b2d997e618585f826a965d125d27
blob + 9e373e9ea71a56438d94e21186e9dff1d7e6d312
--- tog/tog.c
+++ tog/tog.c
if (refs_str) {
char *newlogmsg;
wchar_t *ws;
-
+
/*
* The length of this wide-char sub-string will be
* needed later for colorization.
wattr_on(view->window,
COLOR_PAIR(tc->colorpair), NULL);
waddnwstr(view->window, &wlogmsg[scrollx],
- wrefstr_len - scrollx);
+ MIN(logmsg_width, wrefstr_len - scrollx));
if (tc)
wattr_off(view->window,
COLOR_PAIR(tc->colorpair), NULL);
- waddwstr(view->window, &wlogmsg[wrefstr_len]);
+ if (col + MIN(logmsg_width, wrefstr_len - scrollx) < avail)
+ waddwstr(view->window, &wlogmsg[wrefstr_len]);
} else
waddwstr(view->window, &wlogmsg[scrollx]);
col += MAX(logmsg_width, 0);