From 8e609155bcc1da68be073bb22e7527e88c45a35c Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Mon, 23 Apr 2018 12:50:35 -0400 Subject: [PATCH] fixed bug in moving by line --- lib/buf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } } -- 2.49.0