aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-06-13 22:27:47 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-06-13 22:40:12 -0400
commit18b031ea1d3830c8ff25f4d5ee488f68f464dbee (patch)
treea5153aeadf1bae34dc775fb01186acab745e4ccc /src/nvim/buffer.c
parent6efa3bff09afb0e54ad71278ac60259bf41be286 (diff)
downloadrneovim-18b031ea1d3830c8ff25f4d5ee488f68f464dbee.tar.gz
rneovim-18b031ea1d3830c8ff25f4d5ee488f68f464dbee.tar.bz2
rneovim-18b031ea1d3830c8ff25f4d5ee488f68f464dbee.zip
vim-patch:8.0.0953: get "no write since last change" error in terminal window
Problem: Get "no write since last change" error in terminal window. Solution: Use another message when closing a terminal window. Make ":quit!" also end the job. https://github.com/vim/vim/commit/f5be7cd01642fafc4b7d68894eb60cca60c7a405
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index 52dc359716..cae053f015 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -1425,7 +1425,7 @@ do_buffer(
}
}
if (bufIsChanged(curbuf)) {
- EMSG(_(e_nowrtmsg));
+ no_write_message();
return FAIL;
}
}
@@ -1626,6 +1626,16 @@ void do_autochdir(void)
}
}
+void no_write_message(void)
+{
+ EMSG(_("E37: No write since last change (add ! to override)"));
+}
+
+void no_write_message_nobang(void)
+{
+ EMSG(_("E37: No write since last change"));
+}
+
//
// functions for dealing with the buffer list
//