Patch 8.1.0300
Problem: The old window title might be freed twice. (Dominique Pelle)
Solution: Do not free "oldtitle" in a signal handler but set a flag to have
it freed later.
Files: src/os_unix.c
*** ../vim-8.1.0299/src/os_unix.c 2018-08-11 13:57:16.215969777 +0200
--- src/os_unix.c 2018-08-19 22:13:19.187362836 +0200
***************
*** 161,166 ****
--- 161,167 ----
static int get_x11_icon(int);
static char_u *oldtitle = NULL;
+ static volatile int oldtitle_outdated = FALSE;
static int did_set_title = FALSE;
static char_u *oldicon = NULL;
static int did_set_icon = FALSE;
***************
*** 1231,1238 ****
after_sigcont(void)
{
# ifdef FEAT_TITLE
! // Set oldtitle to NULL, so the current title is obtained again.
! VIM_CLEAR(oldtitle);
# endif
settmode(TMODE_RAW);
need_check_timestamps = TRUE;
--- 1232,1240 ----
after_sigcont(void)
{
# ifdef FEAT_TITLE
! // Don't change "oldtitle" in a signal handler, set a flag to obtain it
! // again later.
! oldtitle_outdated = TRUE;
# endif
settmode(TMODE_RAW);
need_check_timestamps = TRUE;
***************
*** 2281,2286 ****
--- 2283,2293 ----
*/
if ((type || *T_TS != NUL) && title != NULL)
{
+ if (oldtitle_outdated)
+ {
+ oldtitle_outdated = FALSE;
+ VIM_CLEAR(oldtitle);
+ }
if (oldtitle == NULL
#ifdef FEAT_GUI
&& !gui.in_use
*** ../vim-8.1.0299/src/version.c 2018-08-19 17:03:57.369405009 +0200
--- src/version.c 2018-08-19 22:11:53.003778230 +0200
***************
*** 796,797 ****
--- 796,799 ----
{ /* Add new patch number below this line */
+ /**/
+ 300,
/**/
--
System administrators are just like women: You can't live with them and you
can't live without them.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.