blob: 45f5bd25f491670de22b2000368505d3444303e0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0300
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
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 -- Bram@Moolenaar.net -- 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 ///
|