diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-03-10 21:42:50 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-12-01 01:13:49 -0500 |
commit | 11249ad0216c6dac1ba20558038d0fb75add0495 (patch) | |
tree | c53b5bcb6c8138857aee2ac225fb06d9d6876519 /src/nvim/buffer.c | |
parent | 24ab81bd46b217918be1992585e1fffa2e5617ea (diff) | |
download | rneovim-11249ad0216c6dac1ba20558038d0fb75add0495.tar.gz rneovim-11249ad0216c6dac1ba20558038d0fb75add0495.tar.bz2 rneovim-11249ad0216c6dac1ba20558038d0fb75add0495.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.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index ffa44c33cd..a46784fdb6 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -1637,12 +1637,22 @@ void do_autochdir(void) void no_write_message(void) { - EMSG(_("E37: No write since last change (add ! to override)")); + if (curbuf->terminal + && channel_job_running((uint64_t)curbuf->b_p_channel)) { + EMSG(_("E948: Job still running (add ! to end the job)")); + } else { + EMSG(_("E37: No write since last change (add ! to override)")); + } } void no_write_message_nobang(void) { - EMSG(_("E37: No write since last change")); + if (curbuf->terminal + && channel_job_running((uint64_t)curbuf->b_p_channel)) { + EMSG(_("E948: Job still running")); + } else { + EMSG(_("E37: No write since last change")); + } } // |