From 625008f0977b64a79dd02e6fda41f260d3361d9e Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Tue, 21 May 2019 13:14:13 -0400 Subject: [PATCH] tweaked up/dn cursor movement to avoid double tap behavior --- TODO.md | 1 + src/lib/view.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/TODO.md b/TODO.md index 06bae82..79e52ab 100644 --- 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 diff --git a/src/lib/view.c b/src/lib/view.c index deb2e8e..16933b6 100644 --- a/src/lib/view.c +++ b/src/lib/view.c @@ -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) -- 2.52.0