- sidebar fixes (thanks to Lars Ellenberg)
git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@273
e385b8ad-14ed-0310-8656-
cc95a2468c6d
if (list_empty(Incoming))
return;
/* correct known_lines if it has changed because of a window resize */
if (list_empty(Incoming))
return;
/* correct known_lines if it has changed because of a window resize */
- if (known_lines != LINES)
- known_lines = LINES;
+ /* if (known_lines != LINES)
+ known_lines = LINES; */
+
lines = LINES - 2 - (menu != MENU_PAGER || option (OPTSTATUSONTOP));
lines = LINES - 2 - (menu != MENU_PAGER || option (OPTSTATUSONTOP));
if (option (OPTSIDEBARNEWMAILONLY)) {
int i = CurBuffy;
TopBuffy = CurBuffy - 1;
if (option (OPTSIDEBARNEWMAILONLY)) {
int i = CurBuffy;
TopBuffy = CurBuffy - 1;
- snprintf (entry, len-lencnt-1, "%s", box);
+ snprintf (entry, len-lencnt, "%s", box);
entry[safe_strlen (entry)] = ' ';
strncpy (entry + (len - lencnt), no, lencnt);
entry[safe_strlen (entry)] = ' ';
strncpy (entry + (len - lencnt), no, lencnt);
break;
case OP_SIDEBAR_SCROLL_UP:
break;
case OP_SIDEBAR_SCROLL_UP:
mutt_error (_("You are on the first mailbox."));
return;
}
mutt_error (_("You are on the first mailbox."));
return;
}
CurBuffy = 0;
break;
case OP_SIDEBAR_SCROLL_DOWN:
CurBuffy = 0;
break;
case OP_SIDEBAR_SCROLL_DOWN:
- if (TopBuffy + known_lines >= Incoming->length) {
+ if (CurBuffy + 1 == Incoming->length) {
mutt_error (_("You are on the last mailbox."));
return;
}
CurBuffy += known_lines;
if (CurBuffy >= Incoming->length)
mutt_error (_("You are on the last mailbox."));
return;
}
CurBuffy += known_lines;
if (CurBuffy >= Incoming->length)
- CurBuffy = Incoming->length;
+ CurBuffy = Incoming->length - 1;