]> git.mdlowis.com Git - projs/tide.git/commitdiff
removed silly setting of the cursor on file load
authorMichael D. Lowis <mike.lowis@gentex.com>
Thu, 1 Jun 2017 13:21:19 +0000 (09:21 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Thu, 1 Jun 2017 13:21:19 +0000 (09:21 -0400)
TODO.md
lib/view.c

diff --git a/TODO.md b/TODO.md
index 44963862541c5c73f2fa772c7979242017c7c237..0b734dca05d6adcaa6dd4e6f424c3e026a5a831b 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -11,6 +11,7 @@ Up Next:
 
 The Future:
 
+* Scrolling line offset
 * Ctrl+Shift+Enter copies indent of wrong line
 * highlight all matches of search term
 * Make Fn keys execute nth command in the tags buffers
index 37c16f74144329b4ea9973a237064a6e82a006f7..0a31c493bc0544672288be0fdc3fcf4dc172feb9 100644 (file)
@@ -31,13 +31,12 @@ void view_init(View* view, char* file, void (*errfn)(char*)) {
         view->rows  = NULL;
     }
     buf_init(&(view->buffer), errfn);
-    view->selection = (Sel){ 0 };
-    if (file) {
-        view->selection.end = buf_load(&(view->buffer), file);
-        view->selection.beg = view->selection.end;
-        view->sync_needed   = true;
-        view->sync_center   = true;
-    }
+    if (file)
+        buf_load(&(view->buffer), file);
+    view->selection   = (Sel){ 0 };
+    view->sync_needed = true;
+    view->sync_center = true;
+    view->prev_csr    = 0;
 }
 
 void view_reload(View* view) {