From: Christian Heller Date: Thu, 6 Jun 2013 10:10:30 +0000 (+0200) Subject: Only allow movement rightwards if pad is big enough. X-Git-Tag: tce~1247 X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bdb.prefix%7D%7D/%7B%7Bprefix%7D%7D/todo?a=commitdiff_plain;h=0dd958b76e3ef1c2819fa13461b37b8b680ecb66;p=plomrogue Only allow movement rightwards if pad is big enough. --- diff --git a/windows.c b/windows.c index cf64b4e..775f324 100644 --- a/windows.c +++ b/windows.c @@ -18,8 +18,8 @@ struct WinMeta init_win_meta (WINDOW * screen) { return win_meta; } void scroll_pad (struct WinMeta * win_meta, char dir) { -// Scroll pad left (if possible) or right. - if ('+' == dir) +// Scroll pad left or right (if possible). + if ('+' == dir && win_meta->pad_offset + win_meta->width < getmaxx(win_meta->pad)) win_meta->pad_offset++; else if ('-' == dir && win_meta->pad_offset > 0) win_meta->pad_offset--; }