| tmot: stop at eol when searching - neatvi - [fork] simple vi-type editor with U… | |
| git clone git://src.adamsgaard.dk/neatvi | |
| Log | |
| Files | |
| Refs | |
| README | |
| --- | |
| commit 5e4fe1565d620dc22c69a99cb8079a240930a60a | |
| parent 19e46a1b49c9d49bb2d4161dd6acf4727c15749d | |
| Author: Ali Gholami Rudi <[email protected]> | |
| 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(-) | |
| --- | |
| 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, … | |
| *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; | |
| } | |
| } |