aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/ex_docmd.c2
-rw-r--r--src/nvim/spell.c2
-rw-r--r--src/nvim/window.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index af4f34d907..af5635ddba 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -10172,7 +10172,7 @@ Dictionary commands_array(buf_T *buf)
Dictionary rv = ARRAY_DICT_INIT;
Object obj = NIL;
(void)obj; // Avoid "dead assignment" warning.
- char str[10];
+ char str[20];
garray_T *gap = (buf == NULL) ? &ucmds : &buf->b_ucmds;
for (int i = 0; i < gap->ga_len; i++) {
diff --git a/src/nvim/spell.c b/src/nvim/spell.c
index b5885e65f3..66eb4ac3c6 100644
--- a/src/nvim/spell.c
+++ b/src/nvim/spell.c
@@ -1626,7 +1626,7 @@ static void spell_load_lang(char_u *lang)
if (starting) {
// Prompt the user at VimEnter if spell files are missing. #3027
// Plugins aren't loaded yet, so spellfile.vim cannot handle this case.
- char autocmd_buf[128] = { 0 };
+ char autocmd_buf[512] = { 0 };
snprintf(autocmd_buf, sizeof(autocmd_buf),
"autocmd VimEnter * call spellfile#LoadFile('%s')|set spell",
lang);
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 377d712a50..22a8969b88 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -1713,7 +1713,7 @@ static void win_rotate(bool upwards, int count)
return;
}
- if (firstwin == curwin && lastwin_nofloating() == curwin) {
+ if (count <= 0 || (firstwin == curwin && lastwin_nofloating() == curwin)) {
// nothing to do
beep_flush();
return;