0
0
mirror of https://github.com/vim/vim.git synced 2025-10-06 05:44:14 -04:00

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)
This commit is contained in:
Bram Moolenaar
2018-12-31 23:58:24 +01:00
parent 3d631cb0b3
commit e1e714ef0d
6 changed files with 31 additions and 6 deletions

View File

@@ -1705,7 +1705,7 @@ open_line(
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);