mirror of https://github.com/tildeclub/ex-vi.git
* When the name of a nonexisting file is given with the 'edit' ex command,
the command now succeeds and prints a "[New file]" message.
This commit is contained in:
parent
b737eb9531
commit
9fd9a3d91e
5
Changes
5
Changes
|
@ -17,7 +17,8 @@ Release ...
|
|||
* The argument to the -w option is correctly recognized now.
|
||||
* If the SHELL environment variable is set to the empty string, it is now
|
||||
ignored.
|
||||
* A non-null exit status is now returned if a file could not be opened.
|
||||
* A non-null exit status is now returned if a file could not be opened, or
|
||||
if an invalid address is given for a command.
|
||||
* If the match for a substitution is of length zero, a line overflow is
|
||||
now avoided when compiled with the 'UNIX(R) Regular Expression Library'.
|
||||
* When moving left while the cursor is positioned over a multicolumn
|
||||
|
@ -30,6 +31,8 @@ Release ...
|
|||
processed first, i.e. the command is executed at the position where
|
||||
the tag was found.
|
||||
* The -w option now also sets the scroll size for the 'z' command.
|
||||
* When the name of a nonexisting file is given with the 'edit' ex command,
|
||||
the command now succeeds and prints a "[New file]" message.
|
||||
|
||||
Release 1/19/05
|
||||
* The last release erroneously made 'X' work like 'x' in visual mode. It now
|
||||
|
|
15
ex_addr.c
15
ex_addr.c
|
@ -73,7 +73,7 @@
|
|||
|
||||
#ifndef lint
|
||||
#ifdef DOSCCS
|
||||
static char sccsid[] = "@(#)ex_addr.c 1.9 (gritter) 11/23/04";
|
||||
static char sccsid[] = "@(#)ex_addr.c 1.10 (gritter) 2/17/05";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -123,6 +123,7 @@ setdot1(void)
|
|||
addr1 = addr2 = dot;
|
||||
if (addr1 > addr2) {
|
||||
notempty();
|
||||
failed = 1;
|
||||
error(catgets(catd, 1, 6,
|
||||
"Addr1 > addr2|First address exceeds second"));
|
||||
}
|
||||
|
@ -197,9 +198,11 @@ void
|
|||
setnoaddr(void)
|
||||
{
|
||||
|
||||
if (addr2 != 0)
|
||||
if (addr2 != 0) {
|
||||
failed = 1;
|
||||
error(catgets(catd, 1, 8,
|
||||
"No address allowed@on this command"));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -366,12 +369,16 @@ error(catgets(catd, 1, 11, "No match to TOP|Address search hit TOP without match
|
|||
if (addr != zero)
|
||||
notempty();
|
||||
addr += lastsign;
|
||||
if (addr < zero)
|
||||
if (addr < zero) {
|
||||
failed = 1;
|
||||
error(catgets(catd, 1, 15,
|
||||
"Negative address@- first buffer line is 1"));
|
||||
if (addr > dol)
|
||||
}
|
||||
if (addr > dol) {
|
||||
failed = 1;
|
||||
error(catgets(catd, 1, 16,
|
||||
"Not that many lines@in buffer"));
|
||||
}
|
||||
return (addr);
|
||||
}
|
||||
}
|
||||
|
|
7
ex_io.c
7
ex_io.c
|
@ -73,7 +73,7 @@
|
|||
|
||||
#ifndef lint
|
||||
#ifdef DOSCCS
|
||||
static char sccsid[] = "@(#)ex_io.c 1.38 (gritter) 2/13/05";
|
||||
static char sccsid[] = "@(#)ex_io.c 1.39 (gritter) 2/17/05";
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -421,8 +421,11 @@ rop(int c)
|
|||
* If the user just did "ex foo" he is probably
|
||||
* creating a new file. Don't be an error, since
|
||||
* this is ugly, and it screws up the + option.
|
||||
*
|
||||
* POSIX.2 specifies that this be done for all
|
||||
* "edit" commands, not just for the first one.
|
||||
*/
|
||||
if (!seenprompt) {
|
||||
if (1 || !seenprompt) {
|
||||
printf(catgets(catd, 1, 90, " [New file]"));
|
||||
noonl();
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue