diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-05-31 06:10:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-31 06:10:30 +0800 |
commit | 88fe467b194f21cace92109dffc68e8b1362be3e (patch) | |
tree | a64ec7e199444fa8138698c832775a9ebeaf71c0 /src/nvim/strings.c | |
parent | 783f6079b824539bdc4a168ecfebddab474b2924 (diff) | |
parent | 2de12e9bd7fe72eb4656a3c0f689caf6ce971451 (diff) | |
download | rneovim-88fe467b194f21cace92109dffc68e8b1362be3e.tar.gz rneovim-88fe467b194f21cace92109dffc68e8b1362be3e.tar.bz2 rneovim-88fe467b194f21cace92109dffc68e8b1362be3e.zip |
Merge pull request #29102 from zeertzjq/vim-9.1.0449
vim-patch:9.1.{0449,0451}
Diffstat (limited to 'src/nvim/strings.c')
-rw-r--r-- | src/nvim/strings.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/strings.c b/src/nvim/strings.c index 16ae35272b..8fef4ba7fd 100644 --- a/src/nvim/strings.c +++ b/src/nvim/strings.c @@ -268,9 +268,9 @@ char *vim_strsave_shellescape(const char *string, bool do_special, bool do_newli } if (do_special && find_cmdline_var(p, &l) >= 0) { *d++ = '\\'; // insert backslash - while (--l != SIZE_MAX) { // copy the var - *d++ = *p++; - } + memcpy(d, p, l); // copy the var + d += l; + p += l; continue; } if (*p == '\\' && fish_like) { |