diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | src/nvim/ex_docmd.c | 9 | ||||
-rw-r--r-- | src/nvim/globals.h | 51 | ||||
-rw-r--r-- | src/nvim/os/os_defs.h | 26 | ||||
-rw-r--r-- | src/nvim/os/unix_defs.h | 18 | ||||
-rw-r--r-- | src/nvim/os/win_defs.h | 11 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
7 files changed, 61 insertions, 60 deletions
@@ -89,14 +89,14 @@ functionaltest: | nvim testlint: | nvim $(BUILD_CMD) -C build testlint -test: functionaltest - unittest: | nvim +$(BUILD_CMD) -C build unittest benchmark: | nvim +$(BUILD_CMD) -C build benchmark +test: functionaltest unittest + clean: +test -d build && $(BUILD_CMD) -C build clean || true $(MAKE) -C src/nvim/testdir clean diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 4b5844c5bd..59bda9345e 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -3446,6 +3446,7 @@ static linenr_T get_address(char_u **ptr, } if (addr_type != ADDR_LINES) { EMSG(_(e_invaddr)); + cmd = NULL; goto error; } if (skip) @@ -3473,6 +3474,7 @@ static linenr_T get_address(char_u **ptr, c = *cmd++; if (addr_type != ADDR_LINES) { EMSG(_(e_invaddr)); + cmd = NULL; goto error; } if (skip) { /* skip "/pat/" */ @@ -3516,6 +3518,7 @@ static linenr_T get_address(char_u **ptr, ++cmd; if (addr_type != ADDR_LINES) { EMSG(_(e_invaddr)); + cmd = NULL; goto error; } if (*cmd == '&') @@ -3587,7 +3590,8 @@ static linenr_T get_address(char_u **ptr, else n = getdigits(&cmd); if (addr_type == ADDR_LOADED_BUFFERS || addr_type == ADDR_BUFFERS) - lnum = compute_buffer_local_count(addr_type, lnum, (i == '-') ? -1 * n : n); + lnum = compute_buffer_local_count( + addr_type, lnum, (i == '-') ? -1 * n : n); else if (i == '-') lnum -= n; else @@ -3655,7 +3659,8 @@ static char_u *invalid_range(exarg_T *eap) } break; case ADDR_ARGUMENTS: - if (eap->line2 > ARGCOUNT + (!ARGCOUNT)) { // add 1 if ARGCOUNT is 0 + // add 1 if ARGCOUNT is 0 + if (eap->line2 > ARGCOUNT + (!ARGCOUNT)) { return (char_u *)_(e_invrange); } break; diff --git a/src/nvim/globals.h b/src/nvim/globals.h index a623c3c38a..d06cf6bfda 100644 --- a/src/nvim/globals.h +++ b/src/nvim/globals.h @@ -48,6 +48,57 @@ # endif #endif +#ifdef WIN32 +# define _PATHSEPSTR "\\" +#else +# define _PATHSEPSTR "/" +#endif + +#ifndef FILETYPE_FILE +# define FILETYPE_FILE "filetype.vim" +#endif + +#ifndef FTPLUGIN_FILE +# define FTPLUGIN_FILE "ftplugin.vim" +#endif + +#ifndef INDENT_FILE +# define INDENT_FILE "indent.vim" +#endif + +#ifndef FTOFF_FILE +# define FTOFF_FILE "ftoff.vim" +#endif + +#ifndef FTPLUGOF_FILE +# define FTPLUGOF_FILE "ftplugof.vim" +#endif + +#ifndef INDOFF_FILE +# define INDOFF_FILE "indoff.vim" +#endif + +#define DFLT_ERRORFILE "errors.err" + +#ifndef SYS_VIMRC_FILE +# define SYS_VIMRC_FILE "$VIM" _PATHSEPSTR "sysinit.vim" +#endif + +#ifndef DFLT_HELPFILE +# define DFLT_HELPFILE "$VIMRUNTIME" _PATHSEPSTR "doc" _PATHSEPSTR "help.txt" +#endif + +#ifndef SYNTAX_FNAME +# define SYNTAX_FNAME "$VIMRUNTIME" _PATHSEPSTR "syntax" _PATHSEPSTR "%s.vim" +#endif + +#ifndef EXRC_FILE +# define EXRC_FILE ".exrc" +#endif + +#ifndef VIMRC_FILE +# define VIMRC_FILE ".nvimrc" +#endif /* Values for "starting" */ #define NO_SCREEN 2 /* no screen updating yet */ diff --git a/src/nvim/os/os_defs.h b/src/nvim/os/os_defs.h index 55a2d5513e..7d77899287 100644 --- a/src/nvim/os/os_defs.h +++ b/src/nvim/os/os_defs.h @@ -39,32 +39,6 @@ # define MAXPATHL 1024 #endif -#ifndef FILETYPE_FILE -# define FILETYPE_FILE "filetype.vim" -#endif - -#ifndef FTPLUGIN_FILE -# define FTPLUGIN_FILE "ftplugin.vim" -#endif - -#ifndef INDENT_FILE -# define INDENT_FILE "indent.vim" -#endif - -#ifndef FTOFF_FILE -# define FTOFF_FILE "ftoff.vim" -#endif - -#ifndef FTPLUGOF_FILE -# define FTPLUGOF_FILE "ftplugof.vim" -#endif - -#ifndef INDOFF_FILE -# define INDOFF_FILE "indoff.vim" -#endif - -#define DFLT_ERRORFILE "errors.err" - // Command-processing buffer. Use large buffers for all platforms. #define CMDBUFFSIZE 1024 diff --git a/src/nvim/os/unix_defs.h b/src/nvim/os/unix_defs.h index b1511d4b56..e3ba3262f4 100644 --- a/src/nvim/os/unix_defs.h +++ b/src/nvim/os/unix_defs.h @@ -9,7 +9,6 @@ # include <sys/param.h> #endif - #define TEMP_DIR_NAMES {"$TMPDIR", "/tmp", ".", "~"} #define TEMP_FILE_PATH_MAXLEN 256 @@ -18,21 +17,4 @@ // Special wildcards that need to be handled by the shell. #define SPECIAL_WILDCHAR "`'{" -// Unix system-dependent file names -#ifndef SYS_VIMRC_FILE -# define SYS_VIMRC_FILE "$VIM/sysinit.vim" -#endif -#ifndef DFLT_HELPFILE -# define DFLT_HELPFILE "$VIMRUNTIME/doc/help.txt" -#endif -#ifndef SYNTAX_FNAME -# define SYNTAX_FNAME "$VIMRUNTIME/syntax/%s.vim" -#endif -#ifndef EXRC_FILE -# define EXRC_FILE ".exrc" -#endif -#ifndef VIMRC_FILE -# define VIMRC_FILE ".nvimrc" -#endif - #endif // NVIM_OS_UNIX_DEFS_H diff --git a/src/nvim/os/win_defs.h b/src/nvim/os/win_defs.h index bfd431c9c6..32960dfbe9 100644 --- a/src/nvim/os/win_defs.h +++ b/src/nvim/os/win_defs.h @@ -6,17 +6,6 @@ #define TEMP_DIR_NAMES {"$TMP", "$TEMP", "$USERPROFILE", ""} #define TEMP_FILE_PATH_MAXLEN _MAX_PATH -// Defines needed to fix the build on Windows: -// - DFLT_DIR -// - DFLT_BDIR -// - DFLT_VDIR -// - EXRC_FILE -// - VIMRC_FILE -// - SYNTAX_FNAME -// - DFLT_HELPFILE -// - SYS_VIMRC_FILE -// - SPECIAL_WILDCHAR - #define USE_CRNL #ifdef _MSC_VER diff --git a/src/nvim/version.c b/src/nvim/version.c index c9618ae246..c2a3193344 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -379,7 +379,7 @@ static int included_patches[] = { // 620, // 619 NA // 618 NA - // 617, + 617, // 616, 615, // 614, |