ed

simple ed
git clone git://git.2f30.org/ed
Log | Files | Refs | LICENSE

commit 7283f7b7e396bbdc8f6ac0e77a41ec2faae67e0d
parent 6c6329880461d01223eaaf93abb352e16457caaf
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sun, 13 Dec 2015 19:39:22 +0100

Fix chkglobal()

The same error detected in subst() is also present
in chkglobal(), but in this case there is another
error, because the conditions affecting to v
were inverted.

Diffstat:
Med.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ed.c b/ed.c @@ -1231,11 +1231,11 @@ chkglobal(void) delim = input(); compile(delim); - for (i = 1; i <= lastln; i = nextln(i)) { + for (i = 1; i <= lastln; ++i) { if (i >= line1 && i <= line2) - v = 0; - else v = match(i) == dir; + else + v = 0; setglobal(i, v); }