commit - 87f7918db232f45516ff314a7e30b4009196fc1a
commit + 6e6c6afb3ab80111a7b6a873834659c0df8cf7a1
blob - 74b0f596b190da9014ca05d7eb6fe63bdd0aa8cb
blob + 62558fb313faf3888287a234a1e10431bfa815b1
--- cmd.c
+++ cmd.c
return did;
if (vl->parent->flags & L_HIDDEN)
continue;
- if (buffer->current_line == buffer->top_line)
+ if (buffer->current_line == buffer->top_line) {
+ buffer->line_off--;
buffer->top_line = vl;
+ }
buffer->current_line = vl;
n++;
}
forward_line(buffer, -1);
- buffer->line_off--;
buffer->top_line = vl;
}
if (l->type == LINE_PRE_END)
break;
l->flags ^= L_HIDDEN;
+ if (l->flags & L_HIDDEN)
+ buffer->line_max--;
+ else
+ buffer->line_max++;
}
break;
default:
blob - cf6d51f34bd83d0c7f24647f255e03c028f98c6c
blob + 6b0c182475640190da132d9a8c0e6a30fb88d278
--- wrap.c
+++ wrap.c
{
struct vline *vl;
- buffer->line_max++;
+ if (!(l->flags & L_HIDDEN))
+ buffer->line_max++;
if ((vl = calloc(1, sizeof(*vl))) == NULL)
return 0;