]> git.mdlowis.com Git - projs/tide.git/commitdiff
fixed bug in moving by line
authorMichael D. Lowis <mike.lowis@gentex.com>
Mon, 23 Apr 2018 16:50:35 +0000 (12:50 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Mon, 23 Apr 2018 16:50:35 +0000 (12:50 -0400)
lib/buf.c

index a5ebcd2b74138e423a63c60d4feb355b42698ded..c6a2c7b9ca985d6e702b5ae49d06fdc5076570d6 100644 (file)
--- 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;
         }
     }