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
|
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0906
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.0906
Problem: Using clumsy way to get console window handle.
Solution: Use GetConsoleWindow(). (Ken Takata, closes #3940)
Files: src/os_mswin.c
*** ../vim-8.1.0905/src/os_mswin.c 2019-02-10 23:18:49.038187525 +0100
--- src/os_mswin.c 2019-02-12 23:10:26.877686857 +0100
***************
*** 1043,1053 ****
static void
GetConsoleHwnd(void)
{
- # define MY_BUFSIZE 1024 // Buffer size for console window titles.
-
- char pszNewWindowTitle[MY_BUFSIZE]; // Contains fabricated WindowTitle.
- char pszOldWindowTitle[MY_BUFSIZE]; // Contains original WindowTitle.
-
/* Skip if it's already set. */
if (s_hwnd != 0)
return;
--- 1043,1048 ----
***************
*** 1061,1077 ****
}
# endif
! GetConsoleTitle(pszOldWindowTitle, MY_BUFSIZE);
!
! wsprintf(pszNewWindowTitle, "%s/%d/%d",
! pszOldWindowTitle,
! GetTickCount(),
! GetCurrentProcessId());
! SetConsoleTitle(pszNewWindowTitle);
! Sleep(40);
! s_hwnd = FindWindow(NULL, pszNewWindowTitle);
!
! SetConsoleTitle(pszOldWindowTitle);
}
/*
--- 1056,1062 ----
}
# endif
! s_hwnd = GetConsoleWindow();
}
/*
*** ../vim-8.1.0905/src/version.c 2019-02-12 23:05:41.743869435 +0100
--- src/version.c 2019-02-12 23:12:04.368950837 +0100
***************
*** 785,786 ****
--- 785,788 ----
{ /* Add new patch number below this line */
+ /**/
+ 906,
/**/
--
A M00se once bit my sister ...
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// 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 ///
|