瀏覽代碼

Don't jumpdown if bottom is still in the window

Jochen Sprickerhof 5 年之前
父節點
當前提交
1da4931609
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      scroll.c

+ 3 - 0
scroll.c

@@ -357,6 +357,9 @@ scrolldown(char *buf, size_t size, int n)
 void
 void
 jumpdown(char *buf, size_t size)
 jumpdown(char *buf, size_t size)
 {
 {
+	if (bottom == NULL || bottom == TAILQ_FIRST(&head))
+		return;
+
 	int rows = ws.ws_row;
 	int rows = ws.ws_row;
 
 
 	/* wind back by one page starting from the latest line */
 	/* wind back by one page starting from the latest line */