forked from aniani/vim
patch 8.1.0253: saving and restoring window title does not always work
Problem: Saving and restoring window title does not always work. Solution: Use the stack push and pop commands. (Kouichi Iwamoto, closes #3059)
This commit is contained in:
@@ -617,14 +617,14 @@ mch_settitle(char_u *title, char_u *icon)
|
||||
/*
|
||||
* Restore the window/icon title.
|
||||
* which is one of:
|
||||
* 1 Just restore title
|
||||
* 2 Just restore icon (which we don't have)
|
||||
* 3 Restore title and icon (which we don't have)
|
||||
* SAVE_RESTORE_TITLE Just restore title
|
||||
* SAVE_RESTORE_ICON Just restore icon (which we don't have)
|
||||
* SAVE_RESTORE_BOTH Restore title and icon (which we don't have)
|
||||
*/
|
||||
void
|
||||
mch_restore_title(int which)
|
||||
{
|
||||
if (which & 1)
|
||||
if (which & SAVE_RESTORE_TITLE)
|
||||
mch_settitle(oldwindowtitle, NULL);
|
||||
}
|
||||
|
||||
@@ -907,7 +907,7 @@ mch_exit(int r)
|
||||
}
|
||||
|
||||
#ifdef FEAT_TITLE
|
||||
mch_restore_title(3); /* restore window title */
|
||||
mch_restore_title(SAVE_RESTORE_BOTH); /* restore window title */
|
||||
#endif
|
||||
|
||||
ml_close_all(TRUE); /* remove all memfiles */
|
||||
|
Reference in New Issue
Block a user