From d36a246f0e1e4f6e455417447fd2f71834646f12 Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Mon, 1 Oct 2018 11:01:51 -0400 Subject: [PATCH] fixed a bug with scrolling up on CRLF documents --- TODO.md | 4 ++++ lib/view.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index 8c1bc57..8807eb8 100644 --- a/TODO.md +++ b/TODO.md @@ -2,6 +2,8 @@ ## STAGING +* Font tag should only change font in edit region +* centering logic in view.c seems broken * implement new version of tfetch (plumb) * implement tide registrar * implement tctl command @@ -10,6 +12,7 @@ * mouse selection handling when mouse moves outside region * Line - Get the current line number(s) containing the selection * refactor selection handling to avoid swapping manually (use buf_selbeg and buf_selend) +* encode EOL setting in log entries? ## BACKLOG @@ -18,6 +21,7 @@ * B2+B1 click executes command with selection as argument * implement term program * implement pick command +* implement script for toggling between header and source file Tags: diff --git a/lib/view.c b/lib/view.c index 0fc9d89..7ba62d9 100644 --- a/lib/view.c +++ b/lib/view.c @@ -365,7 +365,7 @@ static void scroll_up(View* view) { if (view->index > 0) view->index--; else if (view->rows[0]->off > 0) - resize(view, view->width, view->nvisible, (view->rows[0]->off - 1)); + resize(view, view->width, view->nvisible, buf_byrune(BUF, view->rows[0]->off, LEFT)); } static void scroll_dn(View* view) { -- 2.54.0