aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/shell.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-03-28 13:54:28 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-03-29 18:29:25 -0400
commit375f957af65509bcf80c073362fae1d95bb32380 (patch)
tree9052916efcbf0efe9a3040b17091142ccff0aa6f /src/nvim/os/shell.c
parent3dbcf69888b0f44c06b9ede3928fcd9d68f65739 (diff)
downloadrneovim-375f957af65509bcf80c073362fae1d95bb32380.tar.gz
rneovim-375f957af65509bcf80c073362fae1d95bb32380.tar.bz2
rneovim-375f957af65509bcf80c073362fae1d95bb32380.zip
vim-patch:8.1.0989: various small code ugliness
Problem: Various small code ugliness. Solution: Remove pointless NULL checks. Fix function calls. Fix typos. (Dominique Pelle, closes vim/vim#4060) https://github.com/vim/vim/commit/bdace838c67c1bd94e55e34270a8325933891466
Diffstat (limited to 'src/nvim/os/shell.c')
-rw-r--r--src/nvim/os/shell.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/os/shell.c b/src/nvim/os/shell.c
index b5d890bf52..2974245857 100644
--- a/src/nvim/os/shell.c
+++ b/src/nvim/os/shell.c
@@ -123,7 +123,7 @@ int os_expand_wildcards(int num_pat, char_u **pat, int *num_file,
int shell_style = STYLE_ECHO;
int check_spaces;
static bool did_find_nul = false;
- bool ampersent = false;
+ bool ampersand = false;
// vimglob() function to define for Posix shell
static char *sh_vimglob_func =
"vimglob() { while [ $# -ge 1 ]; do echo \"$1\"; shift; done }; vimglob >";
@@ -245,7 +245,7 @@ int os_expand_wildcards(int num_pat, char_u **pat, int *num_file,
p--;
}
if (*p == '&') { // remove trailing '&'
- ampersent = true;
+ ampersand = true;
*p = ' ';
}
STRCAT(command, ">");
@@ -309,7 +309,7 @@ int os_expand_wildcards(int num_pat, char_u **pat, int *num_file,
shellopts |= kShellOptHideMess;
}
- if (ampersent) {
+ if (ampersand) {
STRCAT(command, "&"); // put the '&' after the redirection
}
@@ -331,7 +331,7 @@ int os_expand_wildcards(int num_pat, char_u **pat, int *num_file,
// When running in the background, give it some time to create the temp
// file, but don't wait for it to finish.
- if (ampersent) {
+ if (ampersand) {
os_delay(10L, true);
}