mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #13428 from janlazo/nvim-8.0.1525
vim-patch:8.0.{858,953,1525}
This commit is contained in:
commit
d80f262f89
@ -1637,12 +1637,23 @@ 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)
|
||||
void no_write_message_nobang(const buf_T *const buf)
|
||||
FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
EMSG(_("E37: No write since last change"));
|
||||
if (buf->terminal
|
||||
&& channel_job_running((uint64_t)buf->b_p_channel)) {
|
||||
EMSG(_("E948: Job still running"));
|
||||
} else {
|
||||
EMSG(_("E37: No write since last change"));
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -1965,7 +1965,12 @@ void do_wqall(exarg_T *eap)
|
||||
}
|
||||
|
||||
FOR_ALL_BUFFERS(buf) {
|
||||
if (!bufIsChanged(buf) || bt_dontwrite(buf)) {
|
||||
if (exiting
|
||||
&& buf->terminal
|
||||
&& channel_job_running((uint64_t)buf->b_p_channel)) {
|
||||
no_write_message_nobang(buf);
|
||||
error++;
|
||||
} else if (!bufIsChanged(buf) || bt_dontwrite(buf)) {
|
||||
continue;
|
||||
}
|
||||
/*
|
||||
|
@ -1297,7 +1297,7 @@ bool check_changed(buf_T *buf, int flags)
|
||||
if (flags & CCGD_EXCMD) {
|
||||
no_write_message();
|
||||
} else {
|
||||
no_write_message_nobang();
|
||||
no_write_message_nobang(curbuf);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -1503,8 +1503,10 @@ bool check_changed_any(bool hidden, bool unload)
|
||||
msg_col = 0;
|
||||
msg_didout = false;
|
||||
}
|
||||
if (EMSG2(_("E162: No write since last change for buffer \"%s\""),
|
||||
buf_spname(buf) != NULL ? buf_spname(buf) : buf->b_fname)) {
|
||||
if ((buf->terminal && channel_job_running((uint64_t)buf->b_p_channel))
|
||||
? EMSG2(_("E947: Job still running in buffer \"%s\""), buf->b_fname)
|
||||
: EMSG2(_("E162: No write since last change for buffer \"%s\""),
|
||||
buf_spname(buf) != NULL ? buf_spname(buf) : buf->b_fname)) {
|
||||
save = no_wait_return;
|
||||
no_wait_return = false;
|
||||
wait_return(false);
|
||||
|
@ -215,8 +215,8 @@ describe('timers', function()
|
||||
endfunc
|
||||
]])
|
||||
command("call timer_start(5, 'MyHandler', {'repeat': 1})")
|
||||
run(nil, nil, nil, load_adjust(10))
|
||||
retry(nil, load_adjust(100), function()
|
||||
run(nil, nil, nil, load_adjust(20))
|
||||
retry(nil, load_adjust(150), function()
|
||||
eq(1, eval("g:val"))
|
||||
end)
|
||||
end)
|
||||
|
@ -6,6 +6,7 @@ local eval, feed_command, source = helpers.eval, helpers.feed_command, helpers.s
|
||||
local eq, neq = helpers.eq, helpers.neq
|
||||
local write_file = helpers.write_file
|
||||
local command= helpers.command
|
||||
local exc_exec = helpers.exc_exec
|
||||
|
||||
describe(':terminal buffer', function()
|
||||
local screen
|
||||
@ -253,6 +254,10 @@ describe(':terminal buffer', function()
|
||||
]])
|
||||
command('bdelete!')
|
||||
end)
|
||||
|
||||
it('handles wqall', function()
|
||||
eq('Vim(wqall):E948: Job still running', exc_exec('wqall'))
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('No heap-buffer-overflow when using', function()
|
||||
|
@ -410,6 +410,7 @@ describe("'scrollback' option", function()
|
||||
command([[let $PROMPT='$$']])
|
||||
screen = thelpers.screen_setup(nil, "['cmd.exe']", 30)
|
||||
else
|
||||
command('let $PS1 = "$"')
|
||||
screen = thelpers.screen_setup(nil, "['sh']", 30)
|
||||
end
|
||||
|
||||
|
@ -161,6 +161,7 @@ describe("'wildmenu'", function()
|
||||
|
||||
if not iswin() then
|
||||
command('set shell=sh') -- Need a predictable "$" prompt.
|
||||
command('let $PS1 = "$"')
|
||||
end
|
||||
command('set laststatus=0')
|
||||
command('vsplit')
|
||||
|
Loading…
Reference in New Issue
Block a user