diff options
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index b22f799da0..5a92a85c97 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -8154,6 +8154,10 @@ static void ex_normal(exarg_T *eap) static void ex_startinsert(exarg_T *eap) { if (eap->forceit) { + // cursor line can be zero on startup + if (!curwin->w_cursor.lnum) { + curwin->w_cursor.lnum = 1; + } coladvance((colnr_T)MAXCOL); curwin->w_curswant = MAXCOL; curwin->w_set_curswant = FALSE; |