diff --git a/editor.cpp b/editor.cpp index dbda4b3..1ca01d7 100644 --- a/editor.cpp +++ b/editor.cpp @@ -137,7 +137,7 @@ std::pair Editor::find(string text) { count_type r = (file_offset + cur.r + _r) % file_size; count_type start = ((_r == 0) ? (cur.c+1) : 0); - count_type pos = file.get_line(r, 0).find(text, start); + count_type pos = file.get_line(r, 1).find(text, start); if(pos != string::npos) return {true,{r, pos}}; } @@ -243,7 +243,8 @@ bool Editor::take_action() { file.split_line(cur + file_offset); print_file(file_offset); cur.r++; - jump_line_end(); + cur.c = 0; + move(cur); break; case '\t': // Modify current_insert TODO