mg

port of mg editor (openbsd to linux)
Log | Files | Refs | README

commit 68942e57b1cb35e24a372db05e9ff58ea0d95607
parent e661761675897a7534d3efa9f523fba63b294620
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Mon, 24 Nov 2014 20:55:03 +0100

allow short-hand y/n

Diffstat:
echo.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/echo.c b/echo.c @@ -126,6 +126,11 @@ eyesno(const char *sp) maclcur->l_fp = lp->l_fp; free(lp); } + /* allow short-hand y/n. */ + if((rep[0] == 'y' || rep[0] == 'Y') && rep[1] == '\0') + return (TRUE); + if((rep[0] == 'n' || rep[0] == 'N') && rep[1] == '\0') + return (FALSE); if ((rep[0] == 'y' || rep[0] == 'Y') && (rep[1] == 'e' || rep[1] == 'E') && (rep[2] == 's' || rep[2] == 'S') &&