aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.ci/msys_build.bat4
-rw-r--r--appveyor.yml15
-rw-r--r--runtime/plugin/man.vim2
-rw-r--r--src/nvim/option.c2
-rw-r--r--src/nvim/path.c12
-rw-r--r--test/functional/options/defaults_spec.lua14
6 files changed, 29 insertions, 20 deletions
diff --git a/.ci/msys_build.bat b/.ci/msys_build.bat
index bf77b5bd34..490c8b6830 100644
--- a/.ci/msys_build.bat
+++ b/.ci/msys_build.bat
@@ -13,9 +13,7 @@ set PATH=C:\msys64\mingw%BITS%\bin;C:\Windows\System32;C:\Windows;%PATH%
mkdir build
cd build
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release .. || goto :error
-:: FIXME(equalsraf): for now just build nvim and copy DLLs.
-:: We can't generate the helptags just yet (#810 fixes this)
-mingw32-make nvim_dll_deps VERBOSE=1 || goto :error
+mingw32-make VERBOSE=1 || goto :error
bin\nvim --version || goto :error
cd ..
diff --git a/appveyor.yml b/appveyor.yml
index 26008bbed3..53a0ca5eb3 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -14,14 +14,9 @@ install: []
build_script:
- if defined BUILD_DEPS_SCRIPT call %BUILD_DEPS_SCRIPT%
- call %BUILD_SCRIPT%
-# FIXME(equalsraf): don't generate artifacts until the
-# build script builds the main target, for now pack bin/
-artifacts:
-- path: build/bin
# Build artifacts
-#- cd build
-#- '"%CPACK%" -G NSIS -C Release'
-#- '"%CPACK%" -G ZIP -C Release'
-#artifacts:
-#- path: build/Neovim.zip
-#- path: build/Neovim.exe
+- cd build
+- '"%CPACK%" -G NSIS -C Release'
+- '"%CPACK%" -G ZIP -C Release'
+artifacts:
+- path: build/Neovim.zip
diff --git a/runtime/plugin/man.vim b/runtime/plugin/man.vim
index b60c98abb8..d49276047f 100644
--- a/runtime/plugin/man.vim
+++ b/runtime/plugin/man.vim
@@ -5,7 +5,7 @@ if exists('g:loaded_man')
endif
let g:loaded_man = 1
-command! -count=0 -complete=customlist,man#complete -nargs=+ Man call man#open_page(v:count, v:count1, <f-args>)
+command! -range=0 -complete=customlist,man#complete -nargs=+ Man call man#open_page(v:count, v:count1, <f-args>)
nnoremap <silent> <Plug>(Man) :<C-U>call man#open_page(v:count, v:count1, &filetype ==# 'man' ? expand('<cWORD>') : expand('<cword>'))<CR>
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 6baf8c65ce..658e0d8a47 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -521,6 +521,8 @@ static void set_runtimepath_default(void)
#undef SITE_SIZE
#undef AFTER_SIZE
set_string_default("runtimepath", rtp, true);
+ // Make a copy of 'rtp' for 'packpath'
+ set_string_default("packpath", rtp, false);
xfree(data_dirs);
xfree(config_dirs);
xfree(data_home);
diff --git a/src/nvim/path.c b/src/nvim/path.c
index 57499429ec..e09d9ac059 100644
--- a/src/nvim/path.c
+++ b/src/nvim/path.c
@@ -562,11 +562,12 @@ static size_t do_path_expand(garray_T *gap, const char_u *path,
while (*path_end != NUL) {
/* May ignore a wildcard that has a backslash before it; it will
* be removed by rem_backslash() or file_pat_to_reg_pat() below. */
- if (path_end >= path + wildoff && rem_backslash(path_end))
+ if (path_end >= path + wildoff && rem_backslash(path_end)) {
*p++ = *path_end++;
- else if (*path_end == '/') {
- if (e != NULL)
+ } else if (vim_ispathsep_nocolon(*path_end)) {
+ if (e != NULL) {
break;
+ }
s = p + 1;
} else if (path_end >= path + wildoff
&& (vim_strchr((char_u *)"*?[{~$", *path_end) != NULL
@@ -2099,7 +2100,6 @@ int path_full_dir_name(char *directory, char *buffer, size_t len)
}
// Append to_append to path with a slash in between.
-// Append to_append to path with a slash in between.
int append_path(char *path, const char *to_append, size_t max_len)
{
size_t current_length = strlen(path);
@@ -2116,7 +2116,7 @@ int append_path(char *path, const char *to_append, size_t max_len)
}
// Glue both paths with a slash.
- if (current_length > 0 && path[current_length-1] != '/') {
+ if (current_length > 0 && !vim_ispathsep_nocolon(path[current_length-1])) {
current_length += 1; // Count the trailing slash.
// +1 for the NUL at the end.
@@ -2124,7 +2124,7 @@ int append_path(char *path, const char *to_append, size_t max_len)
return FAIL;
}
- STRCAT(path, "/");
+ STRCAT(path, PATHSEPSTR);
}
// +1 for the NUL at the end.
diff --git a/test/functional/options/defaults_spec.lua b/test/functional/options/defaults_spec.lua
index 8eec6ad8bf..a131f72cf6 100644
--- a/test/functional/options/defaults_spec.lua
+++ b/test/functional/options/defaults_spec.lua
@@ -7,6 +7,7 @@ local execute = helpers.execute
local clear = helpers.clear
local eval = helpers.eval
local eq = helpers.eq
+local neq = helpers.neq
local function init_session(...)
local args = { helpers.nvim_prog, '-i', 'NONE', '--embed',
@@ -80,6 +81,19 @@ describe('startup defaults', function()
eq(0, eval('exists("g:syntax_on")'))
end)
end)
+
+ describe('packpath', function()
+ it('defaults to &runtimepath', function()
+ eq(meths.get_option('runtimepath'), meths.get_option('packpath'))
+ end)
+
+ it('does not follow modifications to runtimepath', function()
+ meths.command('set runtimepath+=foo')
+ neq(meths.get_option('runtimepath'), meths.get_option('packpath'))
+ meths.command('set packpath+=foo')
+ eq(meths.get_option('runtimepath'), meths.get_option('packpath'))
+ end)
+ end)
end)
describe('XDG-based defaults', function()