aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/executor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/lua/executor.c')
-rw-r--r--src/nvim/lua/executor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c
index 9ec5bfb8ad..eb821f7831 100644
--- a/src/nvim/lua/executor.c
+++ b/src/nvim/lua/executor.c
@@ -519,7 +519,7 @@ static int nlua_print(lua_State *const lstate)
}
msg((char_u *)str + start);
}
- if (str[len - 1] == NUL) { // Last was newline
+ if (len && str[len - 1] == NUL) { // Last was newline
msg((char_u *)"");
}
}