From 03d27b7806278ed1e723203346288e3ba84a0b4d Mon Sep 17 00:00:00 2001 From: "Roberto E. Vargas Caballero" Date: Fri, 1 Jan 2016 11:17:01 +0100 Subject: [PATCH] ed: Reset modflag in clearbuf() For the same reason we don't care about the state of the buffer in clearundo() we can reset modflag in clearbuf(), because after calling it we don't want to know anything about the previous state. --- ed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ed.c b/ed.c index 751e973..7dc80c6 100644 --- a/ed.c +++ b/ed.c @@ -322,7 +322,7 @@ clearbuf() free(zero); zero = NULL; scratch = csize = idxsize = lastidx = curln = lastln = 0; - lastln = curln = 0; + modflag = lastln = curln = 0; } static void