tmot: stop at eol when searching - neatvi - [fork] simple vi-type editor with UTF-8 support
 (HTM) git clone git://src.adamsgaard.dk/neatvi
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
       ---
 (DIR) commit 5e4fe1565d620dc22c69a99cb8079a240930a60a
 (DIR) parent 19e46a1b49c9d49bb2d4161dd6acf4727c15749d
 (HTM) Author: Ali Gholami Rudi <ali@rudi.ir>
       Date:   Sun, 21 Nov 2021 01:37:20 +0330
       
       mot: stop at eol when searching
       
       Diffstat:
         M mot.c                               |       2 +-
       
       1 file changed, 1 insertion(+), 1 deletion(-)
       ---
 (DIR) diff --git a/mot.c b/mot.c
       t@@ -71,7 +71,7 @@ int lbuf_search(struct lbuf *lb, char *kw, int dir, int *r, int *o, int *len)
                                *r = i;
                                *len = uc_off(s + off + offs[0], offs[1] - offs[0]);
                                off += offs[1] > offs[0] ? offs[1] : offs[1] + 1;
       -                        if (dir > 0 || !s[off])
       +                        if (dir > 0 || !s[off] || s[off] == '\n')
                                        break;
                        }
                }