diff --git a/ce/edit.c b/ce/edit.c index cf89bf1..636d9b2 100644 --- a/ce/edit.c +++ b/ce/edit.c @@ -299,7 +299,7 @@ void edit_start (const char* file_path, const char* text, size_t text_len) { if (editor.current_line->gb.gap_end < editor.current_line->gb.size) editor.current_line->gb.gap_end++; } else { - if (editor.cursor.line > 0) { + if (editor.current_line->lines_link.next != NULL) { struct list_node_link* next = editor.current_line->lines_link.next; struct edit_line* next_line = list_entry (next, struct edit_line, lines_link);