diff --git a/Changes b/Changes index 64af4b4..cbbdb9a 100644 --- a/Changes +++ b/Changes @@ -39,6 +39,7 @@ Release ... regular file. * Ex does not exit on errors immediately anymore if standard input is not a terminal but a pipe or regular file. +* The 'substitute' ex command can now be abbreviated as 'sub', 'subst' etc. Release 1/19/05 * The last release erroneously made 'X' work like 'x' in visual mode. It now diff --git a/ex_cmds.c b/ex_cmds.c index 784134c..8fd78ed 100644 --- a/ex_cmds.c +++ b/ex_cmds.c @@ -73,7 +73,7 @@ #ifndef lint #ifdef DOSCCS -static char sccsid[] = "@(#)ex_cmds.c 1.20 (gritter) 2/17/05"; +static char sccsid[] = "@(#)ex_cmds.c 1.21 (gritter) 2/17/05"; #endif #endif @@ -675,7 +675,12 @@ recovnext: tail("stop"); goto suspend; case 'u': - tail("suspend"); + getchar(); + if (peekchar() == 'b') { + tail2of("substitute"); + goto substitute; + } + tail2of("suspend"); suspend: if (!ldisc) error(catgets(catd, 1, 24, @@ -697,10 +702,11 @@ suspend: /* ~ */ /* substitute */ case '&': - case '~': + case '~': Command = "substitute"; if (c == 's') tail(Command); +substitute: vmacchng(0); if (!substitute(c)) pflag = 0;