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/misc1.c b/src/misc1.c
index a552751..00a549d 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -1705,7 +1705,7 @@
if (flags & OPENLINE_MARKFIX)
mark_col_adjust(curwin->w_cursor.lnum,
curwin->w_cursor.col + less_cols_off,
- 1L, (long)-less_cols);
+ 1L, (long)-less_cols, 0);
}
else
changed_bytes(curwin->w_cursor.lnum, curwin->w_cursor.col);