From 01e3690ca870276bfdc78d81a1bd75b7f1a78a9e Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 28 Jul 2019 20:36:51 -0400 Subject: vim-patch:8.1.1049: when user tries to exit with CTRL-C message is confusing Problem: When user tries to exit with CTRL-C message is confusing. Solution: Only mention ":qa!" when there is a changed buffer. (closes vim/vim#4163) https://github.com/vim/vim/commit/a84a3dd6635fcd2e07f510cba6a999585dcc381a vim-patch:8.1.1052: test for CTRL-C message sometimes fails Problem: test for CTRL-C message sometimes fails Solution: Make sure there are no changed buffers. https://github.com/vim/vim/commit/553e5a5c568e7d175b65b0472cd6d9843b25f4c8 vim-patch:8.1.1053: warning for missing return statement Problem: Warning for missing return statement. (Dominique Pelle) Solution: Add return statement. https://github.com/vim/vim/commit/d6c3f1fa2b5e1dd7dc87cf608d72b84ad696b58f --- src/nvim/normal.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/nvim/normal.c') diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 2e4cdc1fe1..4cfd11ab7c 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -7465,8 +7465,12 @@ static void nv_esc(cmdarg_T *cap) && cmdwin_type == 0 && !VIsual_active && no_reason) { - MSG(_("Type :qa! and press to abandon all changes" - " and exit Nvim")); + if (anyBufIsChanged()) { + MSG(_("Type :qa! and press to abandon all changes" + " and exit Nvim")); + } else { + MSG(_("Type :qa and press to exit Nvim")); + } } /* Don't reset "restart_edit" when 'insertmode' is set, it won't be -- cgit