From 06869a6940ea6943ba5e652d08e3062626fe47e9 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 20 Dec 2020 17:01:31 -0500 Subject: vim-patch:8.2.2166: auto format doesn't work when deleting text Problem: Auto format doesn't work when deleting text. Solution: Make "x" trigger auto format. (closes vim/vim#7504) https://github.com/vim/vim/commit/d0a1dee3f197d41434df4cf0271066b6aeb690fc --- src/nvim/edit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/edit.c') diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 1cf821f786..45bd84261d 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -3716,7 +3716,7 @@ static bool ins_compl_prep(int c) retval = true; } - auto_format(FALSE, TRUE); + auto_format(false, true); // Trigger the CompleteDonePre event to give scripts a chance to // act upon the completion before clearing the info, and restore @@ -6503,7 +6503,7 @@ stop_insert ( curwin->w_cursor = tpos; } - auto_format(TRUE, FALSE); + auto_format(true, false); if (ascii_iswhite(cc)) { if (gchar_cursor() != NUL) -- cgit