From 95bce25cd6677ccc21704cd52fa3251092636279 Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Mon, 28 Oct 2019 16:24:51 -0400 Subject: [PATCH] prioritized backlog, fixed bug in moving by line with selection, enabled debug symbols --- Rsconscript | 1 + TODO.md | 28 ++++++++-------------------- src/lib/buf.c | 12 +++++++++--- 3 files changed, 18 insertions(+), 23 deletions(-) diff --git a/Rsconscript b/Rsconscript index 323003f..82eede6 100644 --- a/Rsconscript +++ b/Rsconscript @@ -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 ba4f6ca..110bf3d 100644 --- 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: diff --git a/src/lib/buf.c b/src/lib/buf.c index a956441..ca4d0ec 100644 --- a/src/lib/buf.c +++ b/src/lib/buf.c @@ -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; -- 2.52.0