mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
lint
This commit is contained in:
parent
18c2ae7284
commit
f3dc63a6ff
@ -1948,29 +1948,26 @@ static char_u * do_one_cmd(char_u **cmdlinep,
|
|||||||
* Check for '|' to separate commands and '"' to start comments.
|
* Check for '|' to separate commands and '"' to start comments.
|
||||||
* Don't do this for ":read !cmd" and ":write !cmd".
|
* Don't do this for ":read !cmd" and ":write !cmd".
|
||||||
*/
|
*/
|
||||||
if ((ea.argt & TRLBAR) && !ea.usefilter)
|
if ((ea.argt & TRLBAR) && !ea.usefilter) {
|
||||||
separate_nextcmd(&ea);
|
separate_nextcmd(&ea);
|
||||||
|
} else if (ea.cmdidx == CMD_bang
|
||||||
/*
|
|| ea.cmdidx == CMD_terminal
|
||||||
* Check for <newline> to end a shell command.
|
|| ea.cmdidx == CMD_global
|
||||||
* Also do this for ":read !cmd", ":write !cmd" and ":global".
|
|| ea.cmdidx == CMD_vglobal
|
||||||
* Any others?
|
|| ea.usefilter) {
|
||||||
*/
|
// Check for <newline> to end a shell command.
|
||||||
else if (ea.cmdidx == CMD_bang
|
// Also do this for ":read !cmd", ":write !cmd" and ":global".
|
||||||
|| ea.cmdidx == CMD_terminal
|
// Any others?
|
||||||
|| ea.cmdidx == CMD_global
|
for (p = ea.arg; *p; p++) {
|
||||||
|| ea.cmdidx == CMD_vglobal
|
// Remove one backslash before a newline, so that it's possible to
|
||||||
|| ea.usefilter) {
|
// pass a newline to the shell and also a newline that is preceded
|
||||||
for (p = ea.arg; *p; ++p) {
|
// with a backslash. This makes it impossible to end a shell
|
||||||
/* Remove one backslash before a newline, so that it's possible to
|
// command in a backslash, but that doesn't appear useful.
|
||||||
* pass a newline to the shell and also a newline that is preceded
|
// Halving the number of backslashes is incompatible with previous
|
||||||
* with a backslash. This makes it impossible to end a shell
|
// versions.
|
||||||
* command in a backslash, but that doesn't appear useful.
|
if (*p == '\\' && p[1] == '\n') {
|
||||||
* Halving the number of backslashes is incompatible with previous
|
|
||||||
* versions. */
|
|
||||||
if (*p == '\\' && p[1] == '\n')
|
|
||||||
STRMOVE(p, p + 1);
|
STRMOVE(p, p + 1);
|
||||||
else if (*p == '\n') {
|
} else if (*p == '\n') {
|
||||||
ea.nextcmd = p + 1;
|
ea.nextcmd = p + 1;
|
||||||
*p = NUL;
|
*p = NUL;
|
||||||
break;
|
break;
|
||||||
@ -4152,7 +4149,7 @@ int expand_filename(exarg_T *eap, char_u **cmdlinep, char_u **errormsgp)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For a shell command a '!' must be escaped. */
|
// For a shell command a '!' must be escaped.
|
||||||
if ((eap->usefilter
|
if ((eap->usefilter
|
||||||
|| eap->cmdidx == CMD_bang
|
|| eap->cmdidx == CMD_bang
|
||||||
|| eap->cmdidx == CMD_terminal)
|
|| eap->cmdidx == CMD_terminal)
|
||||||
|
Loading…
Reference in New Issue
Block a user