nne

No-nonsense editor under 777 SLOC of ANSI C
git clone git://git.luxferre.top/nne.git
Log | Files | Refs | README | LICENSE

commit 3f4d3e5f1569cf2bb76665e57ba1de98951e8296
parent bf80c97d6820c808d1de3e28d3d7af94a36bc02e
Author: luxferre <lux@ferre>
Date:   Fri, 28 Jul 2023 07:58:12 +0300

Fixed last column issue

Diffstat:
Mnne.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nne.c b/nne.c @@ -182,7 +182,7 @@ int nne_findscrlineno(int pos) { cc = 0; /* reset column */ } else { /* increment column */ cc += (nne_textbuf[i] == '\t') ? NNE_TABWIDTH : 1; - if((cc % nne_termw) >= (nne_termw - 1)) wcf++; + if(((cc - 1) % nne_termw) >= (nne_termw - 1)) wcf++; } } return rc + wcf + 1; /* newlines + wraps + 1 */