aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/CMakeLists.txt15
-rw-r--r--src/nvim/api/buffer.c20
-rw-r--r--src/nvim/diff.c2
-rw-r--r--src/nvim/edit.c27
-rw-r--r--src/nvim/ex_cmds.c4
-rw-r--r--src/nvim/message.c5
-rw-r--r--src/nvim/msgpack_rpc/channel.c9
-rw-r--r--src/nvim/os/shell.c52
-rw-r--r--src/nvim/os/shell.h15
-rw-r--r--src/nvim/os/time.c37
-rw-r--r--src/nvim/testdir/dotest.in2
-rw-r--r--src/nvim/testdir/test40.in1
-rw-r--r--src/nvim/testdir/test48.in2
-rw-r--r--src/nvim/testdir/test60.in1
-rw-r--r--src/nvim/testdir/test68.in4
-rw-r--r--src/nvim/testdir/test69.in8
-rw-r--r--src/nvim/testdir/test90.in2
-rw-r--r--src/nvim/testdir/test_breakindent.in1
-rw-r--r--src/nvim/testdir/test_breakindent.ok8
-rw-r--r--src/nvim/testdir/test_listlbr.in1
-rw-r--r--src/nvim/testdir/test_listlbr_utf8.in1
21 files changed, 135 insertions, 82 deletions
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
index 184bcc0548..2867857fb3 100644
--- a/src/nvim/CMakeLists.txt
+++ b/src/nvim/CMakeLists.txt
@@ -108,13 +108,15 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
endif()
get_directory_property(gen_cdefs COMPILE_DEFINITIONS)
-foreach(gen_cdef ${gen_cdefs})
- set(gen_cflags "${gen_cflags} -D${gen_cdef}")
+foreach(gen_cdef ${gen_cdefs} DO_NOT_DEFINE_EMPTY_ATTRIBUTES)
+ if(NOT "${gen_cdef}" MATCHES "INCLUDE_GENERATED_DECLARATIONS")
+ list(APPEND gen_cflags "-D${gen_cdef}")
+ endif()
endforeach()
get_directory_property(gen_includes INCLUDE_DIRECTORIES)
foreach(gen_include ${gen_includes})
- set(gen_cflags "${gen_cflags} -I${gen_include}")
+ list(APPEND gen_cflags "-I${gen_include}")
endforeach()
string(TOUPPER "${CMAKE_BUILD_TYPE}" build_type)
set(gen_cflags "${gen_cflags} ${CMAKE_C_FLAGS_${build_type}} ${CMAKE_C_FLAGS}")
@@ -131,11 +133,12 @@ foreach(sfile ${NEOVIM_SOURCES}
endif()
set(gf1 "${GENERATED_DIR}/${r}.c.generated.h")
set(gf2 "${GENERATED_INCLUDES_DIR}/${r}.h.generated.h")
+ set(gf3 "${GENERATED_DIR}/${r}.i")
+ separate_arguments(C_FLAGS_ARRAY UNIX_COMMAND ${CMAKE_C_FLAGS})
add_custom_command(
OUTPUT "${gf1}" "${gf2}"
- COMMAND "${LUA_PRG}" "${HEADER_GENERATOR}"
- "${sfile}" "${gf1}" "${gf2}"
- "${CMAKE_C_COMPILER} ${gen_cflags} -E"
+ COMMAND ${CMAKE_C_COMPILER} ${sfile} -o ${gf3} ${gen_cflags} -E ${C_FLAGS_ARRAY}
+ COMMAND "${LUA_PRG}" "${HEADER_GENERATOR}" "${sfile}" "${gf1}" "${gf2}" "${gf3}"
DEPENDS "${HEADER_GENERATOR}" "${sfile}"
)
list(APPEND NEOVIM_GENERATED_SOURCES "${gf1}")
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c
index 982003a31a..0292e82038 100644
--- a/src/nvim/api/buffer.c
+++ b/src/nvim/api/buffer.c
@@ -132,7 +132,12 @@ ArrayOf(String) buffer_get_line_slice(Buffer buffer,
}
const char *bufstr = (char *) ml_get_buf(buf, (linenr_T) lnum, false);
- rv.items[i] = STRING_OBJ(cstr_to_string(bufstr));
+ Object str = STRING_OBJ(cstr_to_string(bufstr));
+
+ // Vim represents NULs as NLs, but this may confuse clients.
+ strchrsub(str.data.string.data, '\n', '\0');
+
+ rv.items[i] = str;
}
end:
@@ -201,7 +206,18 @@ void buffer_set_line_slice(Buffer buffer,
}
String l = replacement.items[i].data.string;
- lines[i] = xmemdupz(l.data, l.size);
+
+ // Fill lines[i] with l's contents. Disallow newlines in the middle of a
+ // line and convert NULs to newlines to avoid truncation.
+ lines[i] = xmallocz(l.size);
+ for (size_t j = 0; j < l.size; j++) {
+ if (l.data[j] == '\n') {
+ api_set_error(err, Exception, _("string cannot contain newlines"));
+ new_len = i + 1;
+ goto end;
+ }
+ lines[i][j] = (char) (l.data[j] == '\0' ? '\n' : l.data[j]);
+ }
}
try_start();
diff --git a/src/nvim/diff.c b/src/nvim/diff.c
index 18e30f8587..b557753bff 100644
--- a/src/nvim/diff.c
+++ b/src/nvim/diff.c
@@ -918,7 +918,7 @@ void ex_diffpatch(exarg_T *eap)
#endif // ifdef UNIX
// Avoid ShellCmdPost stuff
block_autocmds();
- (void)call_shell(buf, kShellOptFilter | kShellOptCooked, NULL);
+ (void)call_shell(buf, kShellOptFilter, NULL);
unblock_autocmds();
}
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index c7f20783a9..d5ef84ff7b 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -3439,6 +3439,7 @@ static int ins_compl_get_exp(pos_T *ini)
int dict_f = 0;
compl_T *old_match;
int set_match_pos;
+ int l_ctrl_x_mode = ctrl_x_mode;
if (!compl_started) {
FOR_ALL_BUFFERS(buf) {
@@ -3458,10 +3459,12 @@ static int ins_compl_get_exp(pos_T *ini)
found_new_match = FAIL;
set_match_pos = FALSE;
+ assert(l_ctrl_x_mode == ctrl_x_mode);
+
/* For ^N/^P pick a new entry from e_cpt if compl_started is off,
* or if found_all says this entry is done. For ^X^L only use the
* entries from 'complete' that look in loaded buffers. */
- if ((ctrl_x_mode == 0 || ctrl_x_mode == CTRL_X_WHOLE_LINE)
+ if ((l_ctrl_x_mode == 0 || l_ctrl_x_mode == CTRL_X_WHOLE_LINE)
&& (!compl_started || found_all)) {
found_all = FALSE;
while (*e_cpt == ',' || *e_cpt == ' ')
@@ -3470,7 +3473,7 @@ static int ins_compl_get_exp(pos_T *ini)
ins_buf = curbuf;
first_match_pos = *ini;
/* So that ^N can match word immediately after cursor */
- if (ctrl_x_mode == 0)
+ if (l_ctrl_x_mode == 0)
dec(&first_match_pos);
last_match_pos = first_match_pos;
type = 0;
@@ -3506,7 +3509,7 @@ static int ins_compl_get_exp(pos_T *ini)
} else if (*e_cpt == NUL)
break;
else {
- if (ctrl_x_mode == CTRL_X_WHOLE_LINE)
+ if (l_ctrl_x_mode == CTRL_X_WHOLE_LINE)
type = -1;
else if (*e_cpt == 'k' || *e_cpt == 's') {
if (*e_cpt == 'k')
@@ -3576,7 +3579,7 @@ static int ins_compl_get_exp(pos_T *ini)
* of matches is found when compl_pattern is empty */
if (find_tags(compl_pattern, &num_matches, &matches,
TAG_REGEXP | TAG_NAMES | TAG_NOIC |
- TAG_INS_COMP | (ctrl_x_mode ? TAG_VERBOSE : 0),
+ TAG_INS_COMP | (l_ctrl_x_mode ? TAG_VERBOSE : 0),
TAG_MANY, curbuf->b_ffname) == OK && num_matches > 0) {
ins_compl_add_matches(num_matches, matches, p_ic);
}
@@ -3635,9 +3638,9 @@ static int ins_compl_get_exp(pos_T *ini)
++msg_silent; /* Don't want messages for wrapscan. */
- /* ctrl_x_mode == CTRL_X_WHOLE_LINE || word-wise search that
+ /* l_ctrl_x_mode == CTRL_X_WHOLE_LINE || word-wise search that
* has added a word that was at the beginning of the line */
- if ( ctrl_x_mode == CTRL_X_WHOLE_LINE
+ if ( l_ctrl_x_mode == CTRL_X_WHOLE_LINE
|| (compl_cont_status & CONT_SOL))
found_new_match = search_for_exact_line(ins_buf, pos,
compl_direction, compl_pattern);
@@ -3668,7 +3671,7 @@ static int ins_compl_get_exp(pos_T *ini)
&& ini->col == pos->col)
continue;
ptr = ml_get_buf(ins_buf, pos->lnum, FALSE) + pos->col;
- if (ctrl_x_mode == CTRL_X_WHOLE_LINE) {
+ if (l_ctrl_x_mode == CTRL_X_WHOLE_LINE) {
if (compl_cont_status & CONT_ADDING) {
if (pos->lnum >= ins_buf->b_ml.ml_line_count)
continue;
@@ -3751,8 +3754,8 @@ static int ins_compl_get_exp(pos_T *ini)
found_new_match = OK;
/* break the loop for specialized modes (use 'complete' just for the
- * generic ctrl_x_mode == 0) or when we've found a new match */
- if ((ctrl_x_mode != 0 && ctrl_x_mode != CTRL_X_WHOLE_LINE)
+ * generic l_ctrl_x_mode == 0) or when we've found a new match */
+ if ((l_ctrl_x_mode != 0 && l_ctrl_x_mode != CTRL_X_WHOLE_LINE)
|| found_new_match != FAIL) {
if (got_int)
break;
@@ -3760,7 +3763,7 @@ static int ins_compl_get_exp(pos_T *ini)
if (type != -1)
ins_compl_check_keys(0);
- if ((ctrl_x_mode != 0 && ctrl_x_mode != CTRL_X_WHOLE_LINE)
+ if ((l_ctrl_x_mode != 0 && l_ctrl_x_mode != CTRL_X_WHOLE_LINE)
|| compl_interrupted)
break;
compl_started = TRUE;
@@ -3776,13 +3779,13 @@ static int ins_compl_get_exp(pos_T *ini)
}
compl_started = TRUE;
- if ((ctrl_x_mode == 0 || ctrl_x_mode == CTRL_X_WHOLE_LINE)
+ if ((l_ctrl_x_mode == 0 || l_ctrl_x_mode == CTRL_X_WHOLE_LINE)
&& *e_cpt == NUL) /* Got to end of 'complete' */
found_new_match = FAIL;
i = -1; /* total of matches, unknown */
if (found_new_match == FAIL
- || (ctrl_x_mode != 0 && ctrl_x_mode != CTRL_X_WHOLE_LINE))
+ || (l_ctrl_x_mode != 0 && l_ctrl_x_mode != CTRL_X_WHOLE_LINE))
i = ins_compl_make_cyclic();
/* If several matches were added (FORWARD) or the search failed and has
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index 44caa67847..5ae03c6be3 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -1097,7 +1097,7 @@ do_filter (
*/
if (call_shell(
cmd_buf,
- kShellOptFilter | kShellOptCooked | shell_flags,
+ kShellOptFilter | shell_flags,
NULL
)) {
redraw_later_clear();
@@ -1253,7 +1253,7 @@ do_shell (
if (!swapping_screen())
windgoto(msg_row, msg_col);
cursor_on();
- (void)call_shell(cmd, kShellOptCooked | flags, NULL);
+ (void)call_shell(cmd, flags, NULL);
did_check_timestamps = FALSE;
need_check_timestamps = TRUE;
diff --git a/src/nvim/message.c b/src/nvim/message.c
index cd0c548fb4..5832b2e7cb 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -145,7 +145,7 @@ int verb_msg(char_u *s)
return n;
}
-int msg_attr(char_u *s, int attr)
+int msg_attr(char_u *s, int attr) FUNC_ATTR_NONNULL_ARG(1)
{
return msg_attr_keep(s, attr, FALSE);
}
@@ -156,6 +156,7 @@ msg_attr_keep (
int attr,
int keep /* TRUE: set keep_msg if it doesn't scroll */
)
+ FUNC_ATTR_NONNULL_ARG(1)
{
static int entered = 0;
int retval;
@@ -2623,7 +2624,7 @@ int verbose_open(void)
* Give a warning message (for searching).
* Use 'w' highlighting and may repeat the message after redrawing
*/
-void give_warning(char_u *message, bool hl)
+void give_warning(char_u *message, bool hl) FUNC_ATTR_NONNULL_ARG(1)
{
/* Don't do this for ":silent". */
if (msg_silent != 0)
diff --git a/src/nvim/msgpack_rpc/channel.c b/src/nvim/msgpack_rpc/channel.c
index 0c04a7b23e..b6ac3fab82 100644
--- a/src/nvim/msgpack_rpc/channel.c
+++ b/src/nvim/msgpack_rpc/channel.c
@@ -241,6 +241,7 @@ Object channel_send_call(uint64_t id,
if (frame.errored) {
api_set_error(err, Exception, "%s", frame.result.data.string.data);
+ api_free_object(frame.result);
return NIL;
}
@@ -347,7 +348,13 @@ static void job_err(RStream *rstream, void *data, bool eof)
static void job_exit(Job *job, void *data)
{
- free_channel((Channel *)data);
+ Channel *channel = data;
+ // ensure the channel is flagged as closed so channel_send_call frees it
+ // later
+ channel->closed = true;
+ if (!kv_size(channel->call_stack)) {
+ free_channel(channel);
+ }
}
static void parse_msgpack(RStream *rstream, void *data, bool eof)
diff --git a/src/nvim/os/shell.c b/src/nvim/os/shell.c
index cdd85e4e96..88b7f5c73d 100644
--- a/src/nvim/os/shell.c
+++ b/src/nvim/os/shell.c
@@ -141,7 +141,7 @@ int os_call_shell(char_u *cmd, ShellOpts opts, char_u *extra_arg)
}
if (output) {
- write_output(output, nread);
+ (void)write_output(output, nread, true, true);
free(output);
}
@@ -197,6 +197,9 @@ static int shell(const char *cmd,
// the output buffer
DynamicBuffer buf = DYNAMIC_BUFFER_INIT;
rstream_cb data_cb = system_data_cb;
+ if (nread) {
+ *nread = 0;
+ }
if (forward_output) {
data_cb = out_data_cb;
@@ -296,9 +299,9 @@ static void system_data_cb(RStream *rstream, void *data, bool eof)
static void out_data_cb(RStream *rstream, void *data, bool eof)
{
RBuffer *rbuffer = rstream_buffer(rstream);
- size_t len = rbuffer_pending(rbuffer);
- ui_write((char_u *)rbuffer_read_ptr(rbuffer), (int)len);
- rbuffer_consumed(rbuffer, len);
+ size_t written = write_output(rbuffer_read_ptr(rbuffer),
+ rbuffer_pending(rbuffer), false, eof);
+ rbuffer_consumed(rbuffer, written);
}
/// Parses a command string into a sequence of words, taking quotes into
@@ -407,18 +410,27 @@ static void read_input(DynamicBuffer *buf)
}
}
-static void write_output(char *output, size_t remaining)
+static size_t write_output(char *output, size_t remaining, bool to_buffer,
+ bool eof)
{
if (!output) {
- return;
+ return 0;
}
+ char *start = output;
size_t off = 0;
while (off < remaining) {
if (output[off] == NL) {
// Insert the line
output[off] = NUL;
- ml_append(curwin->w_cursor.lnum++, (char_u *)output, 0, false);
+ if (to_buffer) {
+ ml_append(curwin->w_cursor.lnum++, (char_u *)output, 0, false);
+ } else {
+ // pending data from the output buffer has been flushed to the screen,
+ // safe to call ui_write directly
+ ui_write((char_u *)output, (int)off);
+ ui_write((char_u *)"\r\n", 2);
+ }
size_t skip = off + 1;
output += skip;
remaining -= skip;
@@ -433,14 +445,26 @@ static void write_output(char *output, size_t remaining)
off++;
}
- if (remaining) {
- // append unfinished line
- ml_append(curwin->w_cursor.lnum++, (char_u *)output, 0, false);
- // remember that the NL was missing
- curbuf->b_no_eol_lnum = curwin->w_cursor.lnum;
- } else {
- curbuf->b_no_eol_lnum = 0;
+ if (eof) {
+ if (remaining) {
+ if (to_buffer) {
+ // append unfinished line
+ ml_append(curwin->w_cursor.lnum++, (char_u *)output, 0, false);
+ // remember that the NL was missing
+ curbuf->b_no_eol_lnum = curwin->w_cursor.lnum;
+ } else {
+ ui_write((char_u *)output, (int)remaining);
+ ui_write((char_u *)"\r\n", 2);
+ }
+ output += remaining;
+ } else if (to_buffer) {
+ curbuf->b_no_eol_lnum = 0;
+ }
}
+
+ out_flush();
+
+ return (size_t)(output - start);
}
static void shell_write_cb(WStream *wstream, void *data, int status)
diff --git a/src/nvim/os/shell.h b/src/nvim/os/shell.h
index a4c588d7a3..64e7c79ba7 100644
--- a/src/nvim/os/shell.h
+++ b/src/nvim/os/shell.h
@@ -5,14 +5,13 @@
// Flags for mch_call_shell() second argument
typedef enum {
- kShellOptFilter = 1, ///< filtering text
- kShellOptExpand = 2, ///< expanding wildcards
- kShellOptCooked = 4, ///< set term to cooked mode
- kShellOptDoOut = 8, ///< redirecting output
- kShellOptSilent = 16, ///< don't print error returned by command
- kShellOptRead = 32, ///< read lines and insert into buffer
- kShellOptWrite = 64, ///< write lines from buffer
- kShellOptHideMess = 128, ///< previously a global variable from os_unix.c
+ kShellOptFilter = 1, ///< filtering text
+ kShellOptExpand = 2, ///< expanding wildcards
+ kShellOptDoOut = 4, ///< redirecting output
+ kShellOptSilent = 8, ///< don't print error returned by command
+ kShellOptRead = 16, ///< read lines and insert into buffer
+ kShellOptWrite = 32, ///< write lines from buffer
+ kShellOptHideMess = 64, ///< previously a global variable from os_unix.c
} ShellOpts;
#ifdef INCLUDE_GENERATED_DECLARATIONS
diff --git a/src/nvim/os/time.c b/src/nvim/os/time.c
index 3794e813d2..810ddea82b 100644
--- a/src/nvim/os/time.c
+++ b/src/nvim/os/time.c
@@ -54,7 +54,22 @@ void os_delay(uint64_t milliseconds, bool ignoreinput)
/// @param microseconds Number of microseconds to sleep
void os_microdelay(uint64_t microseconds)
{
- microdelay(microseconds);
+ uint64_t elapsed = 0;
+ uint64_t ns = microseconds * 1000; // convert to nanoseconds
+ uint64_t base = uv_hrtime();
+
+ uv_mutex_lock(&delay_mutex);
+
+ while (elapsed < ns) {
+ if (uv_cond_timedwait(&delay_cond, &delay_mutex, ns - elapsed)
+ == UV_ETIMEDOUT)
+ break;
+ uint64_t now = uv_hrtime();
+ elapsed += now - base;
+ base = now;
+ }
+
+ uv_mutex_unlock(&delay_mutex);
}
/// Portable version of POSIX localtime_r()
@@ -88,23 +103,3 @@ struct tm *os_get_localtime(struct tm *result) FUNC_ATTR_NONNULL_ALL
time_t rawtime = time(NULL);
return os_localtime_r(&rawtime, result);
}
-
-static void microdelay(uint64_t microseconds)
-{
- uint64_t elapsed = 0;
- uint64_t ns = microseconds * 1000; // convert to nanoseconds
- uint64_t base = uv_hrtime();
-
- uv_mutex_lock(&delay_mutex);
-
- while (elapsed < ns) {
- if (uv_cond_timedwait(&delay_cond, &delay_mutex, ns - elapsed)
- == UV_ETIMEDOUT)
- break;
- uint64_t now = uv_hrtime();
- elapsed += now - base;
- base = now;
- }
-
- uv_mutex_unlock(&delay_mutex);
-}
diff --git a/src/nvim/testdir/dotest.in b/src/nvim/testdir/dotest.in
index b2a0e1a68e..b495f674f8 100644
--- a/src/nvim/testdir/dotest.in
+++ b/src/nvim/testdir/dotest.in
@@ -1,3 +1,3 @@
-:set cp
+:set nocp nomore
:map dotest /^STARTTEST j:set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest :set ff& cpo+=A nj0:so! Xdotest dotest
dotest
diff --git a/src/nvim/testdir/test40.in b/src/nvim/testdir/test40.in
index d92a18f3d0..ced4572fb8 100644
--- a/src/nvim/testdir/test40.in
+++ b/src/nvim/testdir/test40.in
@@ -2,6 +2,7 @@ Test for "*Cmd" autocommands
STARTTEST
:so small.vim
+:set wildchar=^E
:/^start/,$w! Xxx " write lines below to Xxx
:au BufReadCmd XtestA 0r Xxx|$del
:e XtestA " will read text of Xxd instead
diff --git a/src/nvim/testdir/test48.in b/src/nvim/testdir/test48.in
index 48f4abbf75..25ea2fa154 100644
--- a/src/nvim/testdir/test48.in
+++ b/src/nvim/testdir/test48.in
@@ -4,7 +4,7 @@ STARTTEST
:so small.vim
:set noswf
:set ve=all
--dgg
+j-dgg
:"
:" Insert "keyword keyw", ESC, C CTRL-N, shows "keyword ykeyword".
:" Repeating CTRL-N fixes it. (Mary Ellen Foster)
diff --git a/src/nvim/testdir/test60.in b/src/nvim/testdir/test60.in
index 8835df9e0c..f0f1aecedd 100644
--- a/src/nvim/testdir/test60.in
+++ b/src/nvim/testdir/test60.in
@@ -2,6 +2,7 @@ Tests for the exists() and has() functions. vim: set ft=vim ts=8 sw=2 :
STARTTEST
:so small.vim
+:set wildchar=^E
:function! RunTest(str, result)
if exists(a:str) == a:result
echo "OK"
diff --git a/src/nvim/testdir/test68.in b/src/nvim/testdir/test68.in
index ceaf9af1ab..ca54e942b5 100644
--- a/src/nvim/testdir/test68.in
+++ b/src/nvim/testdir/test68.in
@@ -30,7 +30,7 @@ STARTTEST
/^{/+1
:set tw=3 fo=t
gqgqo
-a 
+a 
ENDTEST
{
@@ -99,7 +99,7 @@ ENDTEST
STARTTEST
/^{/+2
:set tw& fo=a
-I^^
+I^^
ENDTEST
{
diff --git a/src/nvim/testdir/test69.in b/src/nvim/testdir/test69.in
index 674dc32812..26f41e8a29 100644
--- a/src/nvim/testdir/test69.in
+++ b/src/nvim/testdir/test69.in
@@ -15,7 +15,7 @@ STARTTEST
:set tw=2 fo=t
gqgqjgqgqo
XYZ
-abc XYZ
+abc XYZ
ENDTEST
{
@@ -31,7 +31,7 @@ gqgqjgqgqjgqgqjgqgqjgqgqo
Xa
X a
XY
-X Y
+X Y
ENDTEST
{
@@ -55,7 +55,7 @@ aX
abX
abcX
abX c
-abXY
+abXY
ENDTEST
{
@@ -110,7 +110,7 @@ gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo
X YZ
XX
XXa
-XXY
+XXY
ENDTEST
{
diff --git a/src/nvim/testdir/test90.in b/src/nvim/testdir/test90.in
index 6bac414f31..3c0d8c030c 100644
--- a/src/nvim/testdir/test90.in
+++ b/src/nvim/testdir/test90.in
@@ -2,7 +2,7 @@ Tests for sha256() function. vim: set ft=vim et ts=2 sw=2 :
STARTTEST
:so small.vim
-:if !has('cryptv') || !exists('*sha256')
+:if !exists('*sha256')
e! test.ok
wq! test.out
:endif
diff --git a/src/nvim/testdir/test_breakindent.in b/src/nvim/testdir/test_breakindent.in
index 150c9430db..0b00c95a85 100644
--- a/src/nvim/testdir/test_breakindent.in
+++ b/src/nvim/testdir/test_breakindent.in
@@ -3,6 +3,7 @@ Test for breakindent
STARTTEST
:so small.vim
:if !exists("+breakindent") | e! test.ok | w! test.out | qa! | endif
+:set wildchar=^E
:10new|:vsp|:vert resize 20
:put =\"\tabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP\"
:set ts=4 sw=4 sts=4 breakindent
diff --git a/src/nvim/testdir/test_breakindent.ok b/src/nvim/testdir/test_breakindent.ok
index d89d424fb3..a530c18fd3 100644
--- a/src/nvim/testdir/test_breakindent.ok
+++ b/src/nvim/testdir/test_breakindent.ok
@@ -33,13 +33,13 @@ Test 4: Simple breakindent + min width: 18
Test 7: breakindent + shift by +1 + nu + sbr=? briopt:sbr
2 ab
-? m
-? x
+ ? m
+ ? x
Test 8: breakindent + shift:1 + nu + sbr=# list briopt:sbr
2 ^Iabcd
-# opq
-# BCD
+ # opq
+ # BCD
Test 9: breakindent + shift by +1 + 'nu' + sbr=# list
2 ^Iabcd
diff --git a/src/nvim/testdir/test_listlbr.in b/src/nvim/testdir/test_listlbr.in
index 75b06b4cc7..36235ea915 100644
--- a/src/nvim/testdir/test_listlbr.in
+++ b/src/nvim/testdir/test_listlbr.in
@@ -3,6 +3,7 @@ Test for linebreak and list option (non-utf8)
STARTTEST
:so small.vim
:if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif
+:set wildchar=^E
:10new|:vsp|:vert resize 20
:put =\"\tabcdef hijklmn\tpqrstuvwxyz_1060ABCDEFGHIJKLMNOP \"
:norm! zt
diff --git a/src/nvim/testdir/test_listlbr_utf8.in b/src/nvim/testdir/test_listlbr_utf8.in
index ba12adae05..23b3098786 100644
--- a/src/nvim/testdir/test_listlbr_utf8.in
+++ b/src/nvim/testdir/test_listlbr_utf8.in
@@ -3,6 +3,7 @@ Test for linebreak and list option in utf-8 mode
STARTTEST
:so small.vim
:if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif
+:set wildchar=^E
:so mbyte.vim
:if &enc !=? 'utf-8'|:e! test.ok|:w! test.out|qa!|endif
:10new|:vsp|:vert resize 20