commit - f2e547bc13d05b5421166896fb342d178fa7dc1f
commit + 77fc0a255189c6c18e1ea0d6ea82ae1d0ddb4ea7
blob - b36e61c3235f83e985356cd25d8fb8657cc2f6c8
blob + 96f7de49f09ae8cf589aa33bf8856131995de5fb
--- 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);