2
0
Эх сурвалжийг харах

Reset the cursor every time we open a new file

rexim 2 жил өмнө
parent
commit
f62bf8c581
1 өөрчлөгдсөн 2 нэмэгдсэн , 0 устгасан
  1. 2 0
      src/editor.c

+ 2 - 0
src/editor.c

@@ -57,6 +57,8 @@ Errno editor_load_from_file(Editor *e, const char *file_path)
     Errno err = read_entire_file(file_path, &e->data);
     if (err != 0) return err;
 
+    e->cursor = 0;
+
     editor_recompute_lines(e);
 
     e->file_path.count = 0;