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 -- [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.