]> git.mdlowis.com Git - projs/tide.git/commitdiff
prioritized backlog, fixed bug in moving by line with selection, enabled debug symbols
authorMichael D. Lowis <mike.lowis@gentex.com>
Mon, 28 Oct 2019 20:24:51 +0000 (16:24 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Mon, 28 Oct 2019 20:24:51 +0000 (16:24 -0400)
Rsconscript
TODO.md
src/lib/buf.c

index 323003f69a74e9e477a1daa45544123bcf5a5eaa..82eede623e7cffea450a29fe194dfeb5b62a43ae 100644 (file)
@@ -11,6 +11,7 @@ build do
   env = Environment.new
   env["prefix"] = ENV["PREFIX"] || env["prefix"]
   env["CC"] = "./alcc"
+  env["CFLAGS"] += %w[-g]
   env["CPPPATH"] += %w[. inc]
   env["LIBPATH"] += %w[.]
 
diff --git a/TODO.md b/TODO.md
index ba4f6ca44f4fd9a6353ad4f14243c2a8280db4fd..110bf3de9c62f2f059d04974c6049455e4023b59 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -9,36 +9,24 @@
 * all: eliminate multiple return statements and other lint
 * tide: byrune, byword, byline functions should be hidden in buf.c
 * tide: buf_findstr has an infinite loop condition
-* tide: refactor undo/redo api in view.c
 
 ## BACKLOG
 
+* tide: commands unadorned by a sigil should direct output to new scratch window
+* tide: gap buffer does not handle UTF-8 currently
+* tide: add tag to enable/disable scrolling on command output insertion
+* tide: encode EOL setting in log entries?
+* tfetch: read rules from rcfile in home and curr dir
+* tfetch: ls results instead of pcmanfm on right click directory
+* tcmd: 9term-like terminal window
 * anvil: support moving floating windows
 * anvil: add support for multiple workspaces
 * anvil: add column support
 * anvil: add support for multiple monitors
-* anvil: add support for session management
 * tide: add support for session management
 * tide: implement drag and drop support
-* tide: commands unadorned by a sigil should direct output to new scratch window
-* 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
-* tide: encode EOL setting in log entries?
+* anvil: add support for session management
 * tsed: implement a mini-sed command to standardize scripts across platforms without relying on sed
-* tide: refactor selection handling to avoid swapping manually (use buf_selbeg and buf_selend)
-* tide: add tag to enable/disable scrolling on command output insertion
-* tcmd: 9term-like terminal window
-
-### TFRAME
-
-* Multiple slave columns for tframe
-* Adjusting size of children within a tframe column
-* single selection within tframe used for exec wtih arg.
-* update window title based on active child window
-* Dump/Load tags for tframe session
-* scratch windows go to bottom of slace stack (far right bottom)
-* non-scratch windows go to top of slave stack (far left top of slave region)
 
 Tags:
 
index a95644199f72f6d102c372cead14f50348bf9c17..ca4d0ecd17a6f5b4e07b393cf259d356ede76dd4 100644 (file)
@@ -851,6 +851,12 @@ void buf_selmove(Buf* buf, bool extsel, int move, int bything)
         buf_selclr(buf, move);
         if (bything == BY_LINE)
         {
+            /* we perform one less move if we are going down but selection
+                ends on the beginning of the next line */
+            if (move > 0 && buf_isbol(buf, buf_selend(buf)))
+            {
+                move--;
+            }
             buf->selection.end = buf_moveby(buf, bything, buf->selection.end, move);
         }
     }
@@ -861,17 +867,17 @@ void buf_selmove(Buf* buf, bool extsel, int move, int bything)
 
     if (bything == BY_LINE)
     {
-        setcol(buf);
+        setcol(buf); // set cursor to correct column
     }
     else
     {
-        getcol(buf);
+        getcol(buf); // update column tracking with cursor position
     }
 
+    /* collapse the selection if necessary, without updating column */
     if (!extsel)
     {
         Sel sel = selget(buf);
-        /* collapse the selection */
         if (move > 0)
         {
             sel.beg = sel.end;