sbase

suckless unix tools
git clone git://git.suckless.org/sbase
Log | Files | Refs | README | LICENSE

commit 6a557314b97a256f21a9964a6fb47f7b08427455
parent bbdd7bedc464fb2a4c39c6afe40e79c4e5071e15
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 28 Dec 2023 17:26:50 +0100

ed: Don't undo commands in sigint

If newcmd is 0 then error() undo all the modifications
that happened since the last command, but this is  not
what POSIX mandates:

SIGINT	The ed utility shall interrupt its current activity, write the
	string "?\n" to standard output, and return to command mode
	(see the EXTENDED DESCRIPTION section).

Diffstat:
Med.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/ed.c b/ed.c @@ -740,6 +740,7 @@ chksignals(void) if (intr) { intr = 0; + newcmd = 1; clearerr(stdin); error("Interrupt"); }