]> git.mdlowis.com Git - projs/tide.git/commitdiff
fixed logic for clearing a selection on moving with the arrow keys
authorMichael D. Lowis <mike.lowis@gentex.com>
Tue, 30 May 2017 15:13:53 +0000 (11:13 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Tue, 30 May 2017 15:13:53 +0000 (11:13 -0400)
TODO.md
lib/view.c

diff --git a/TODO.md b/TODO.md
index 45560d30925d50af04be206e57ce43b6b374c3f9..1b39ab25288e56a38614b14631a42e0cf464a44d 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -5,7 +5,6 @@ Up Next:
 * move by words is inconsistent. Example:
     var infoId = 'readerinfo'+reader.id;
 * Add a way to CD using a builtin (buffers will track original dir)
-* selection of size 1 and arrow keys moves wrong direction
 * cd to root in xcpd
 * Ctrl+; Shortcut to warp cursor to middle of current screen.
 * shortcut to jump to previous edit
index 6d330ace895dfb1108579f808ef03231c7d1b15d..e682c12b473d847adfa6475e6b925bc811e678fc 100644 (file)
@@ -264,6 +264,7 @@ Row* view_getrow(View* view, size_t row) {
 void view_byrune(View* view, int move, bool extsel) {
     Sel sel = view->selection;
     if (view_selsize(view) && !extsel) {
+        selswap(&sel);
         if (move == RIGHT)
             sel.beg = sel.end;
         else