commit 28eca2fc4a093ee751cf49c8087e6bb09a02ae44 from: Omar Polo date: Sun Jun 20 21:00:52 2021 UTC fix cmd_scroll_line_up buffer->current_line *IS NOT* the first line at the top of the window... commit - 7f963c410faa911376fc67144d2ca817d7cfeae8 commit + 28eca2fc4a093ee751cf49c8087e6bb09a02ae44 blob - b2b5ba11415b0529872c05bb984076dcc8674f38 blob + d513d833c89215eaee35acec350856495dab3762 --- cmd.c +++ cmd.c @@ -134,16 +134,14 @@ cmd_redraw(struct buffer *buffer) void cmd_scroll_line_up(struct buffer *buffer) { - struct vline *vl; - if (buffer->current_line == NULL) return; - if ((vl = TAILQ_PREV(buffer->current_line, vhead, vlines)) == NULL) + if (buffer->line_off == 0) return; - buffer->current_line = vl; buffer->line_off--; + buffer->current_line = TAILQ_PREV(buffer->current_line, vhead, vlines); restore_cursor(buffer); }