commit - 69e1c12a07cad69482c2e445348a4d07e30033ce
commit + b471d6700229aeffa6e61ddda52e572057337211
blob - 9ce480ab9621f92565caa28207ccc60fd3861816
blob + 02bc69712b041bfec75c628922b9315b3d025d6a
--- cmd.c
+++ cmd.c
{
struct vline *vl;
+ if (buffer->top_line == NULL)
+ return;
+
if ((vl = TAILQ_PREV(buffer->top_line, vhead, vlines))
== NULL)
return;
struct vline *vl;
int i;
+ if (buffer->top_line == NULL)
+ return;
+
for (i = 0; i < body_lines; ++i) {
vl = TAILQ_PREV(buffer->top_line, vhead, vlines);
if (vl == NULL)
cmd_scroll_down(struct buffer *buffer)
{
int i;
+
+ if (buffer->top_line == NULL)
+ return;
for (i = 0; i < body_lines; ++i) {
if (!forward_line(buffer, +1))