* The 'substitute' ex command can now be abbreviated as 'sub', 'subst' etc.

This commit is contained in:
Gunnar Ritter 2005-02-17 19:31:36 +00:00
parent aada6fd740
commit 6afc996872
2 changed files with 10 additions and 3 deletions

View File

@ -39,6 +39,7 @@ Release ...
regular file. regular file.
* Ex does not exit on errors immediately anymore if standard input is not * Ex does not exit on errors immediately anymore if standard input is not
a terminal but a pipe or regular file. a terminal but a pipe or regular file.
* The 'substitute' ex command can now be abbreviated as 'sub', 'subst' etc.
Release 1/19/05 Release 1/19/05
* The last release erroneously made 'X' work like 'x' in visual mode. It now * The last release erroneously made 'X' work like 'x' in visual mode. It now

View File

@ -73,7 +73,7 @@
#ifndef lint #ifndef lint
#ifdef DOSCCS #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
#endif #endif
@ -675,7 +675,12 @@ recovnext:
tail("stop"); tail("stop");
goto suspend; goto suspend;
case 'u': case 'u':
tail("suspend"); getchar();
if (peekchar() == 'b') {
tail2of("substitute");
goto substitute;
}
tail2of("suspend");
suspend: suspend:
if (!ldisc) if (!ldisc)
error(catgets(catd, 1, 24, error(catgets(catd, 1, 24,
@ -697,10 +702,11 @@ suspend:
/* ~ */ /* ~ */
/* substitute */ /* substitute */
case '&': case '&':
case '~': case '~':
Command = "substitute"; Command = "substitute";
if (c == 's') if (c == 's')
tail(Command); tail(Command);
substitute:
vmacchng(0); vmacchng(0);
if (!substitute(c)) if (!substitute(c))
pflag = 0; pflag = 0;