]> git.mdlowis.com Git - projs/tide.git/commitdiff
removed use of selection arg from view code
authorMichael D. Lowis <mike.lowis@gentex.com>
Wed, 4 Apr 2018 17:19:53 +0000 (13:19 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Wed, 4 Apr 2018 17:19:53 +0000 (13:19 -0400)
lib/view.c

index 12bfef38dbc83867c512e3167a61f71fd990f342..4f87f30aadcef195c2607f7de173bb3db865e56d 100644 (file)
@@ -291,11 +291,11 @@ static void move_selection(View* view, bool extsel, int move, movefn_t bything)
     if (buf_selsz(&(view->buffer), NULL) && !extsel) {
         buf_selclr(&(view->buffer), NULL, move);
     } else {
-        Sel* sel = getsel(view);
-        sel->end = bything(&(view->buffer), sel->end, move);
+        getsel(view)->end = bything(&(view->buffer), getsel(view)->end, move);
         if (bything == buf_byline)
             buf_setcol(&(view->buffer), NULL);
-        if (!extsel) buf_selclr(&(view->buffer), sel, move);
+        if (!extsel)
+            buf_selclr(&(view->buffer), NULL, move);
     }
     /* only update column if not moving vertically */
     if (bything != buf_byline)