Commit Diff


commit - fe5636b8c499a568f750c99279b5d6275cf7e44b
commit + f04d2fc5d267fbe439306a1e4c759ae850ce0db1
blob - 753f150d7d9f52feac477a5a20f94d92099386aa
blob + 4344981f416635b8a4aa36fa5080291f884b8dcd
--- cmd.c
+++ cmd.c
@@ -218,7 +218,12 @@ void
 cmd_end_of_buffer(struct buffer *buffer)
 {
 	buffer->current_line = TAILQ_LAST(&buffer->head, vhead);
-	buffer->cpoff = body_cols;
+
+	/* deal with invisible lines */
+	if (buffer->current_line->parent->flags & L_HIDDEN)
+		forward_line(buffer, -1);
+
+	cmd_move_end_of_line(buffer);
 }
 
 void