diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-10-10 08:22:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-10 08:22:32 +0800 |
commit | f5eabaa9407ae3d1ccf6592337453c423eff3d9a (patch) | |
tree | f6c011f53187d5e0abe76ef23f1c99d704e3336f /src | |
parent | 43f22853fecf312713deed983b9cde1a6bda6ebd (diff) | |
download | rneovim-f5eabaa9407ae3d1ccf6592337453c423eff3d9a.tar.gz rneovim-f5eabaa9407ae3d1ccf6592337453c423eff3d9a.tar.bz2 rneovim-f5eabaa9407ae3d1ccf6592337453c423eff3d9a.zip |
fix(path): restore space separation in 'path' (#25571)
Removing this behavior causes more inconsistencies and bugs.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/options.lua | 4 | ||||
-rw-r--r-- | src/nvim/path.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/options.lua b/src/nvim/options.lua index 396fa7c670..68d88ea0aa 100644 --- a/src/nvim/options.lua +++ b/src/nvim/options.lua @@ -5926,6 +5926,10 @@ return { option may be relative or absolute. - Use commas to separate directory names: > :set path=.,/usr/local/include,/usr/include + < - Spaces can also be used to separate directory names. To have a + space in a directory name, precede it with an extra backslash, and + escape the space: > + :set path=.,/dir/with\\\ space < - To include a comma in a directory name precede it with an extra backslash: > :set path=.,/dir/with\\,comma diff --git a/src/nvim/path.c b/src/nvim/path.c index 5d991ce719..15a8762da1 100644 --- a/src/nvim/path.c +++ b/src/nvim/path.c @@ -848,7 +848,7 @@ static void expand_path_option(char *curdir, garray_T *gap) char *buf = xmalloc(MAXPATHL); while (*path_option != NUL) { - copy_option_part(&path_option, buf, MAXPATHL, ","); + copy_option_part(&path_option, buf, MAXPATHL, " ,"); if (buf[0] == '.' && (buf[1] == NUL || vim_ispathsep(buf[1]))) { // Relative to current buffer: |