aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/eval.c10
-rw-r--r--src/nvim/event/process.c10
-rw-r--r--src/nvim/ex_getln.c2
-rw-r--r--src/nvim/memory.c2
-rw-r--r--src/nvim/option.c2
-rw-r--r--src/nvim/os/pty_process_unix.c10
-rw-r--r--src/nvim/screen.c2
-rw-r--r--src/nvim/testdir/test_diffmode.vim3
-rw-r--r--src/nvim/testdir/test_options.vim2
9 files changed, 22 insertions, 21 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 1935478f15..becd4eaca1 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -22025,6 +22025,7 @@ static bool script_autoload(const char *const name, const size_t name_len,
}
/// Return the autoload script name for a function or variable name
+/// Caller must make sure that "name" contains AUTOLOAD_CHAR.
///
/// @param[in] name Variable/function name.
/// @param[in] name_len Name length.
@@ -22213,12 +22214,9 @@ static void func_clear_items(ufunc_T *fp)
ga_clear_strings(&(fp->uf_args));
ga_clear_strings(&(fp->uf_lines));
- xfree(fp->uf_tml_count);
- fp->uf_tml_count = NULL;
- xfree(fp->uf_tml_total);
- fp->uf_tml_total = NULL;
- xfree(fp->uf_tml_self);
- fp->uf_tml_self = NULL;
+ XFREE_CLEAR(fp->uf_tml_count);
+ XFREE_CLEAR(fp->uf_tml_total);
+ XFREE_CLEAR(fp->uf_tml_self);
}
/// Free all things that a function contains. Does not free the function
diff --git a/src/nvim/event/process.c b/src/nvim/event/process.c
index 7a8a39dbcf..990dee0c7f 100644
--- a/src/nvim/event/process.c
+++ b/src/nvim/event/process.c
@@ -26,6 +26,11 @@
// For PTY processes SIGTERM is sent first (in case SIGHUP was not enough).
#define KILL_TIMEOUT_MS 2000
+/// Externally defined with gcov.
+#ifdef USE_GCOV
+void __gcov_flush(void);
+#endif
+
static bool process_is_tearing_down = false;
/// @returns zero on success, or negative error code
@@ -50,6 +55,11 @@ int process_spawn(Process *proc, bool in, bool out, bool err)
proc->err.closed = true;
}
+#ifdef USE_GCOV
+ // Flush coverage data before forking, to avoid "Merge mismatch" errors.
+ __gcov_flush();
+#endif
+
int status;
switch (proc->type) {
case kProcessTypeUv:
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 1f258985a6..093067894f 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -2495,7 +2495,7 @@ static void realloc_cmdbuff(int len)
static char_u *arshape_buf = NULL;
# if defined(EXITFREE)
-void free_cmdline_buf(void)
+void free_arshape_buf(void)
{
xfree(arshape_buf);
}
diff --git a/src/nvim/memory.c b/src/nvim/memory.c
index dced03f3d5..1384aa177b 100644
--- a/src/nvim/memory.c
+++ b/src/nvim/memory.c
@@ -648,7 +648,7 @@ void free_all_mem(void)
// Free all option values. Must come after closing windows.
free_all_options();
- free_cmdline_buf();
+ free_arshape_buf();
/* Clear registers. */
clear_registers();
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 2c96dae64e..9cdcf4cc34 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -4275,7 +4275,7 @@ static char *set_num_option(int opt_idx, char_u *varp, long value,
} else if (pp == &curwin->w_p_nuw || pp == &curwin->w_allbuf_opt.wo_nuw) {
if (value < 1) {
errmsg = e_positive;
- } else if (value > 10) {
+ } else if (value > 20) {
errmsg = e_invarg;
}
} else if (pp == &curbuf->b_p_iminsert || pp == &p_iminsert) {
diff --git a/src/nvim/os/pty_process_unix.c b/src/nvim/os/pty_process_unix.c
index 97545a6cb1..5fdf0e6181 100644
--- a/src/nvim/os/pty_process_unix.c
+++ b/src/nvim/os/pty_process_unix.c
@@ -36,11 +36,6 @@
# include "os/pty_process_unix.c.generated.h"
#endif
-/// Externally defined with gcov.
-#ifdef USE_GCOV
-void __gcov_flush(void);
-#endif
-
/// termios saved at startup (for TUI) or initialized by pty_process_spawn().
static struct termios termios_default;
@@ -64,11 +59,6 @@ int pty_process_spawn(PtyProcess *ptyproc)
init_termios(&termios_default);
}
-#ifdef USE_GCOV
- // Flush coverage data before forking, to avoid "Merge mismatch" errors.
- __gcov_flush();
-#endif
-
int status = 0; // zero or negative error code (libuv convention)
Process *proc = (Process *)ptyproc;
assert(proc->err.closed);
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 94887e113a..a007aa9a47 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -2086,7 +2086,7 @@ win_line (
int lcs_eol_one = wp->w_p_lcs_chars.eol; // 'eol' until it's been used
int lcs_prec_todo = wp->w_p_lcs_chars.prec; // 'prec' until it's been used
- /* saved "extra" items for when draw_state becomes WL_LINE (again) */
+ // saved "extra" items for when draw_state becomes WL_LINE (again)
int saved_n_extra = 0;
char_u *saved_p_extra = NULL;
int saved_c_extra = 0;
diff --git a/src/nvim/testdir/test_diffmode.vim b/src/nvim/testdir/test_diffmode.vim
index 00f4563f3d..1ba36ca8e9 100644
--- a/src/nvim/testdir/test_diffmode.vim
+++ b/src/nvim/testdir/test_diffmode.vim
@@ -752,6 +752,9 @@ func Test_diff_of_diff()
if !CanRunVimInTerminal()
return
endif
+ if !has("rightleft")
+ throw 'Skipped: rightleft not supported'
+ endif
call writefile([
\ 'call setline(1, ["aa","bb","cc","@@ -3,2 +5,7 @@","dd","ee","ff"])',
diff --git a/src/nvim/testdir/test_options.vim b/src/nvim/testdir/test_options.vim
index 28576709a3..a6ebd7b023 100644
--- a/src/nvim/testdir/test_options.vim
+++ b/src/nvim/testdir/test_options.vim
@@ -231,7 +231,7 @@ func Test_set_errors()
call assert_fails('set backupcopy=', 'E474:')
call assert_fails('set regexpengine=3', 'E474:')
call assert_fails('set history=10001', 'E474:')
- call assert_fails('set numberwidth=11', 'E474:')
+ call assert_fails('set numberwidth=21', 'E474:')
call assert_fails('set colorcolumn=-a')
call assert_fails('set colorcolumn=a')
call assert_fails('set colorcolumn=1,')