patch 8.1.0671: cursor in the wrong column after auto-formatting

Problem:    Cursor in the wrong column after auto-formatting.
Solution:   Check for deleting more spaces than adding. (closes #3748)
diff --git a/src/mark.c b/src/mark.c
index f9e3ce3..e3e209c 100644
--- a/src/mark.c
+++ b/src/mark.c
@@ -1211,6 +1211,8 @@
 	    posp->lnum += lnum_amount; \
 	    if (col_amount < 0 && posp->col <= (colnr_T)-col_amount) \
 		posp->col = 0; \
+	    else if (posp->col < spaces_removed) \
+		posp->col = col_amount + spaces_removed; \
 	    else \
 		posp->col += col_amount; \
 	} \
@@ -1220,13 +1222,16 @@
  * Adjust marks in line "lnum" at column "mincol" and further: add
  * "lnum_amount" to the line number and add "col_amount" to the column
  * position.
+ * "spaces_removed" is the number of spaces that were removed, matters when the
+ * cursor is inside them.
  */
     void
 mark_col_adjust(
     linenr_T	lnum,
     colnr_T	mincol,
     long	lnum_amount,
-    long	col_amount)
+    long	col_amount,
+    int		spaces_removed)
 {
     int		i;
     int		fnum = curbuf->b_fnum;