diff options
Diffstat (limited to 'src/textformat.c')
-rw-r--r-- | src/textformat.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/textformat.c b/src/textformat.c index 7e32c1ccc..5ba2f1798 100644 --- a/src/textformat.c +++ b/src/textformat.c @@ -870,6 +870,9 @@ op_format( { curwin->w_cursor = saved_cursor; saved_cursor.lnum = 0; + + // formatting may have made the cursor position invalid + check_cursor(); } if (oap->is_VIsual) |