From: Michael D. Lowis Date: Mon, 23 Apr 2018 16:50:35 +0000 (-0400) Subject: fixed bug in moving by line X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=8e609155bcc1da68be073bb22e7527e88c45a35c;p=projs%2Ftide.git fixed bug in moving by line --- diff --git a/lib/buf.c b/lib/buf.c index a5ebcd2..c6a2c7b 100644 --- a/lib/buf.c +++ b/lib/buf.c @@ -329,7 +329,7 @@ size_t buf_byline(Buf* buf, size_t pos, int count) { pos = buf_bol(buf, (buf_bol(buf, pos) - 1)); } else { size_t next = (buf_eol(buf, pos) + 1); - if (next < buf_end(buf)) + if (next <= buf_end(buf)) pos = next; } }