From 9dd0e849a693420a938687bc4734343d548d0090 Mon Sep 17 00:00:00 2001 From: djcb Date: Wed, 17 Oct 2012 12:26:11 +0300 Subject: [PATCH] * mu4e: make `mu4e-view-scroll-up-or-next' a bit more robust --- mu4e/mu4e-view.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mu4e/mu4e-view.el b/mu4e/mu4e-view.el index 54dfc276..81f3d655 100644 --- a/mu4e/mu4e-view.el +++ b/mu4e/mu4e-view.el @@ -1068,11 +1068,12 @@ attachments) in response to a (mu4e~proc-extract 'temp ... )." "Scroll-up the current message; if mu4e-view-scroll-to-next is non-nil, and we can't scroll-up anymore, go the next message." (interactive) - (if (and mu4e-view-scroll-to-next - (zerop (- (point-max) (window-end nil t)))) - (mu4e-view-headers-next) - (scroll-up))) - + (condition-case nil + (scroll-up) + (error + (when mu4e-view-scroll-to-next + (mu4e-view-headers-next))))) + (defun mu4e-view-unmark-all () "If we're in split-view, unmark all messages. Otherwise, warn user that unmarking only works in the header list."