]> git.mdlowis.com Git - projs/tide.git/commitdiff
tweaked up/dn cursor movement to avoid double tap behavior
authorMichael D. Lowis <mike.lowis@gentex.com>
Tue, 21 May 2019 17:14:13 +0000 (13:14 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Tue, 21 May 2019 17:14:13 +0000 (13:14 -0400)
TODO.md
src/lib/view.c

diff --git a/TODO.md b/TODO.md
index 06bae82a2d05cebf48a38c8c0ca892982d9bc8b3..79e52aba08d22c11c18c75c3f2c61e0f82c02f9f 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -4,6 +4,7 @@
 
 ## STAGING
 
+* tide: move mouse when tag region collapses
 * tfetch: read rules from rcfile in home and curr dir
 * tfetch: ls results instead of pcmanfm on right click directory
 * tide: gap buffer does not handle UTF-8 currently
index deb2e8e34ec30b30adb76f58e6cd273edcf92223..16933b6b96fc12c49dc4fffef0392eefa690b9e1 100644 (file)
@@ -17,6 +17,12 @@ static void move_selection(View* view, bool extsel, int move, movefn_t bything)
     if (buf_selsz(BUF) && !extsel) {
         buf_selclr(BUF, move);
         buf_getcol(BUF);
+        if (bything == buf_byline) {
+            CSRPOS = bything(BUF, CSRPOS, move);
+            buf_setcol(BUF);
+            if (!extsel)
+                buf_selclr(BUF, (move < 0 ? LEFT : RIGHT));
+        }
     } else {
         CSRPOS = bything(BUF, CSRPOS, move);
         if (bything == buf_byline)