Commit Diff


commit - 1575cb8a2cf436e843a63afb9370ef059bedafc5
commit + e39920a9e6863737b01eb7a7299f0af4faebb586
blob - 62a6b39eb871aaab770af1a265fc98c10f68512b
blob + 78c9c7fa881c57bf6fa0727bf970895c94cc9b5a
--- cmd.c
+++ cmd.c
@@ -139,11 +139,16 @@ cmd_redraw(struct buffer *buffer)
 void
 cmd_scroll_line_up(struct buffer *buffer)
 {
-	if (!forward_line(buffer, -1))
+	struct vline	*vl;
+
+	if ((vl = TAILQ_PREV(buffer->top_line, vhead, vlines))
+	    == NULL)
 		return;
 
+	forward_line(buffer, -1);
+
 	buffer->line_off--;
-	buffer->top_line = TAILQ_PREV(buffer->top_line, vhead, vlines);
+	buffer->top_line = vl;
 }
 
 void