From: Michael D. Lowis Date: Thu, 1 Jun 2017 13:21:19 +0000 (-0400) Subject: removed silly setting of the cursor on file load X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=d0f31be5824ddf5474a9a4d0b2697514609426ad;p=projs%2Ftide.git removed silly setting of the cursor on file load --- diff --git a/TODO.md b/TODO.md index 4496386..0b734dc 100644 --- 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 diff --git a/lib/view.c b/lib/view.c index 37c16f7..0a31c49 100644 --- a/lib/view.c +++ b/lib/view.c @@ -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) {