Fix #1629 (wrong scroll pos on narrow)

(imported from commit ac78077f104b079406e745c3eb9ff11b759d033e)
This commit is contained in:
Scott Feeney 2013-07-31 14:35:48 -04:00
parent b13361708f
commit 473a96fd1f
1 changed files with 4 additions and 6 deletions

View File

@ -382,12 +382,10 @@ exports.activate = function (operators, opts) {
if (! narrowed_msg_list.empty()) {
if (opts.select_first_unread) {
then_select_id = narrowed_msg_list.last().id;
_.each(narrowed_msg_list.all(), function (msg) {
if (unread.message_unread(msg)) {
then_select_id = msg.id;
return false;
}
});
var first_unread = _.find(narrowed_msg_list.all(),
unread.message_unread);
if (first_unread)
then_select_id = first_unread.id;
}
var preserve_pre_narrowing_screen_position =