patch 8.0.1151: "vim -c startinsert!" doesn't append
Problem: "vim -c startinsert!" doesn't append.
Solution: Correct line number on startup. (Christian Brabandt, closes #2117)
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index c740d03..e2dfd92 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -10294,6 +10294,9 @@
{
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;