aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--runtime/doc/options.txt5
-rw-r--r--src/nvim/ex_docmd.c9
-rw-r--r--src/nvim/globals.h53
-rw-r--r--src/nvim/os/os_defs.h26
-rw-r--r--src/nvim/os/unix_defs.h18
-rw-r--r--src/nvim/os/win_defs.h11
-rw-r--r--src/nvim/regexp_nfa.c7
-rw-r--r--src/nvim/version.c6
9 files changed, 70 insertions, 69 deletions
diff --git a/Makefile b/Makefile
index 343307eb2b..1fc15e1312 100644
--- a/Makefile
+++ b/Makefile
@@ -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/runtime/doc/options.txt b/runtime/doc/options.txt
index bbf3da8de7..70a585654e 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1561,8 +1561,7 @@ A jump table for the options with a short description can be found at |Q_op|.
1 Each block of concealed text is replaced with one
character. If the syntax item does not have a custom
replacement character defined (see |:syn-cchar|) the
- character defined in 'listchars' is used (default is a
- space).
+ character defined in 'listchars' is used.
It is highlighted with the "Conceal" highlight group.
2 Concealed text is completely hidden unless it has a
custom replacement character defined (see
@@ -4076,7 +4075,7 @@ A jump table for the options with a short description can be found at |Q_op|.
visible in the first column.
*lcs-conceal*
conceal:c Character to show in place of concealed text, when
- 'conceallevel' is set to 1.
+ 'conceallevel' is set to 1. A space when omitted.
*lcs-nbsp*
nbsp:c Character to show for a non-breakable space (character
0xA0, 160). Left blank when omitted.
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..52eebebf41 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 */
@@ -991,7 +1042,7 @@ EXTERN int lcs_space INIT(= NUL);
EXTERN int lcs_tab1 INIT(= NUL);
EXTERN int lcs_tab2 INIT(= NUL);
EXTERN int lcs_trail INIT(= NUL);
-EXTERN int lcs_conceal INIT(= '-');
+EXTERN int lcs_conceal INIT(= ' ');
/* Characters from 'fillchars' option */
EXTERN int fill_stl INIT(= ' ');
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/regexp_nfa.c b/src/nvim/regexp_nfa.c
index fa356da5b9..b96dcc66b3 100644
--- a/src/nvim/regexp_nfa.c
+++ b/src/nvim/regexp_nfa.c
@@ -1897,9 +1897,10 @@ static int nfa_regpiece(void)
return OK;
}
- // The engine is very inefficient (uses too many states) when the maximum is
- // much larger than the minimum. Bail out if we can use the other engine.
- if ((nfa_re_flags & RE_AUTO) && maxval > minval + 200) {
+ // The engine is very inefficient (uses too many states) when the maximum
+ // is much larger than the minimum and when the maximum is large. Bail out
+ // if we can use the other engine.
+ if ((nfa_re_flags & RE_AUTO) && (maxval > minval + 200 || maxval > 500)) {
return FAIL;
}
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 12d02f778e..83a47c207d 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -365,7 +365,7 @@ static int included_patches[] = {
// 634,
633,
// 632 NA
- // 631,
+ 631,
630,
629,
// 628,
@@ -373,13 +373,13 @@ static int included_patches[] = {
// 626 NA
// 625 NA
// 624,
- // 623,
+ 623,
// 622 NA
// 621 NA
// 620,
// 619 NA
// 618 NA
- // 617,
+ 617,
// 616,
615,
// 614,