Merge #8929 from janlazo/vim-8.0.0983

This commit is contained in:
Justin M. Keyes 2018-08-28 22:39:02 +02:00 committed by GitHub
commit 885ca3b7a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View File

@ -1279,15 +1279,14 @@ bool check_changed(buf_T *buf, int flags)
///
/// @param buf
/// @param checkall may abandon all changed buffers
void dialog_changed(buf_T *buf, int checkall)
void dialog_changed(buf_T *buf, bool checkall)
{
char_u buff[DIALOG_MSG_SIZE];
int ret;
exarg_T ea;
dialog_msg(buff, _("Save changes to \"%s\"?"),
(buf->b_fname != NULL) ?
buf->b_fname : (char_u *)_("Untitled"));
assert(buf->b_fname != NULL);
dialog_msg(buff, _("Save changes to \"%s\"?"), buf->b_fname);
if (checkall) {
ret = vim_dialog_yesnoallcancel(VIM_QUESTION, NULL, buff, 1);
} else {

View File

@ -2882,8 +2882,8 @@ close_others (
}
if (!r) {
if (message && (p_confirm || cmdmod.confirm) && p_write) {
dialog_changed(wp->w_buffer, FALSE);
if (!win_valid(wp)) { /* autocommands messed wp up */
dialog_changed(wp->w_buffer, false);
if (!win_valid(wp)) { // autocommands messed wp up
nextwp = firstwin;
continue;
}