aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-05-28 23:17:09 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-05-28 23:17:09 -0400
commitf3dc63a6ffe2fdd3b8a675e9f3fdb4e12f4658d5 (patch)
tree03355d11ae87b7ffaa5b0e3a83d8582bf112837f /src
parent18c2ae7284cbdab0c05954f511ad824e1bcf102c (diff)
downloadrneovim-f3dc63a6ffe2fdd3b8a675e9f3fdb4e12f4658d5.tar.gz
rneovim-f3dc63a6ffe2fdd3b8a675e9f3fdb4e12f4658d5.tar.bz2
rneovim-f3dc63a6ffe2fdd3b8a675e9f3fdb4e12f4658d5.zip
lint
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ex_docmd.c41
1 files changed, 19 insertions, 22 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index df4ced2539..ec4b16fbb0 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -1948,29 +1948,26 @@ static char_u * do_one_cmd(char_u **cmdlinep,
* Check for '|' to separate commands and '"' to start comments.
* 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);
-
- /*
- * Check for <newline> to end a shell command.
- * Also do this for ":read !cmd", ":write !cmd" and ":global".
- * Any others?
- */
- else if (ea.cmdidx == CMD_bang
- || ea.cmdidx == CMD_terminal
- || ea.cmdidx == CMD_global
- || ea.cmdidx == CMD_vglobal
- || ea.usefilter) {
- for (p = ea.arg; *p; ++p) {
- /* Remove one backslash before a newline, so that it's possible to
- * pass a newline to the shell and also a newline that is preceded
- * with a backslash. This makes it impossible to end a shell
- * command in a backslash, but that doesn't appear useful.
- * Halving the number of backslashes is incompatible with previous
- * versions. */
- if (*p == '\\' && p[1] == '\n')
+ } else if (ea.cmdidx == CMD_bang
+ || ea.cmdidx == CMD_terminal
+ || ea.cmdidx == CMD_global
+ || ea.cmdidx == CMD_vglobal
+ || ea.usefilter) {
+ // Check for <newline> to end a shell command.
+ // Also do this for ":read !cmd", ":write !cmd" and ":global".
+ // Any others?
+ for (p = ea.arg; *p; p++) {
+ // Remove one backslash before a newline, so that it's possible to
+ // pass a newline to the shell and also a newline that is preceded
+ // with a backslash. This makes it impossible to end a shell
+ // command in a backslash, but that doesn't appear useful.
+ // Halving the number of backslashes is incompatible with previous
+ // versions.
+ if (*p == '\\' && p[1] == '\n') {
STRMOVE(p, p + 1);
- else if (*p == '\n') {
+ } else if (*p == '\n') {
ea.nextcmd = p + 1;
*p = NUL;
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
|| eap->cmdidx == CMD_bang
|| eap->cmdidx == CMD_terminal)