[hackers] [sbase] ed: Reset modflag in clearbuf() || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Fri, 1 Jan 2016 11:40:05 +0100 (CET)

commit 03d27b7806278ed1e723203346288e3ba84a0b4d
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Fri Jan 1 11:17:01 2016 +0100
Commit: sin <sin_AT_2f30.org>
CommitDate: Fri Jan 1 10:39:59 2016 +0000

    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.

diff --git a/ed.c b/ed.c
index 751e973..7dc80c6 100644
--- a/ed.c
+++ b/ed.c
_AT_@ -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
Received on Fri Jan 01 2016 - 11:40:05 CET

This archive was generated by hypermail 2.3.0 : Fri Jan 01 2016 - 11:48:17 CET