To: vim_dev@googlegroups.com Subject: Patch 9.0.0496 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.0496 Problem: No good reason to keep supporting Windows-XP. Solution: Drop Windows-XP support. (Ken Takata, closes #11089) Files: README.md, README.txt, runtime/doc/gui_w32.txt, runtime/doc/os_win32.txt, src/INSTALLpc.txt, src/Make_cyg_ming.mak, src/Make_mvc.mak, src/os_mswin.c, src/os_win32.c *** ../vim-9.0.0495/README.md 2022-06-28 11:26:05.000000000 +0100 --- README.md 2022-09-18 12:17:58.514925208 +0100 *************** *** 1,6 **** [![Vim Logo](https://github.com/vim/vim/raw/master/runtime/vimlogo.gif)](https://www.vim.org) ! [![Github Build status](https://github.com/vim/vim/workflows/GitHub%20CI/badge.svg)](https://github.com/vim/vim/actions?query=workflow%3A%22GitHub+CI%22) [![Travis Build Status](https://travis-ci.com/vim/vim.svg?branch=master)](https://travis-ci.com/github/vim/vim) [![Appveyor Build status](https://ci.appveyor.com/api/projects/status/o2qht2kjm02sgghk?svg=true)](https://ci.appveyor.com/project/chrisbra/vim) [![Cirrus Build Status](https://api.cirrus-ci.com/github/vim/vim.svg)](https://cirrus-ci.com/github/vim/vim) [![Coverage Status](https://codecov.io/gh/vim/vim/coverage.svg?branch=master)](https://codecov.io/gh/vim/vim?branch=master) [![Coverity Scan](https://scan.coverity.com/projects/241/badge.svg)](https://scan.coverity.com/projects/vim) [![Language Grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/vim/vim.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/vim/vim/context:cpp) [![Debian CI](https://badges.debian.net/badges/debian/testing/vim/version.svg)](https://buildd.debian.org/vim) [![Packages](https://repology.org/badge/tiny-repos/vim.svg)](https://repology.org/metapackage/vim) [![Fossies codespell report](https://fossies.org/linux/test/vim-master.tar.gz/codespell.svg)](https://fossies.org/linux/test/vim-master.tar.gz/codespell.html) For translations of this README see the end. --- 1,6 ---- [![Vim Logo](https://github.com/vim/vim/raw/master/runtime/vimlogo.gif)](https://www.vim.org) ! [![Github Build status](https://github.com/vim/vim/workflows/GitHub%20CI/badge.svg)](https://github.com/vim/vim/actions?query=workflow%3A%22GitHub+CI%22) [![Appveyor Build status](https://ci.appveyor.com/api/projects/status/o2qht2kjm02sgghk?svg=true)](https://ci.appveyor.com/project/chrisbra/vim) [![Cirrus Build Status](https://api.cirrus-ci.com/github/vim/vim.svg)](https://cirrus-ci.com/github/vim/vim) [![Coverage Status](https://codecov.io/gh/vim/vim/coverage.svg?branch=master)](https://codecov.io/gh/vim/vim?branch=master) [![Coverity Scan](https://scan.coverity.com/projects/241/badge.svg)](https://scan.coverity.com/projects/vim) [![Language Grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/vim/vim.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/vim/vim/context:cpp) [![Debian CI](https://badges.debian.net/badges/debian/testing/vim/version.svg)](https://buildd.debian.org/vim) [![Packages](https://repology.org/badge/tiny-repos/vim.svg)](https://repology.org/metapackage/vim) [![Fossies codespell report](https://fossies.org/linux/test/vim-master.tar.gz/codespell.svg)](https://fossies.org/linux/test/vim-master.tar.gz/codespell.html) For translations of this README see the end. *************** *** 28,37 **** with ten fingers can work very fast. Additionally, function keys can be mapped to commands by the user, and the mouse can be used. ! Vim runs under MS-Windows (XP, Vista, 7, 8, 10), macOS, Haiku, VMS and almost ! all flavours of UNIX. Porting to other systems should not be very difficult. ! Older versions of Vim run on MS-DOS, MS-Windows 95/98/Me/NT/2000, Amiga DOS, ! Atari MiNT, BeOS, RISC OS and OS/2. These are no longer maintained. For Vim9 script see [README_VIM9](README_VIM9.md). --- 28,37 ---- with ten fingers can work very fast. Additionally, function keys can be mapped to commands by the user, and the mouse can be used. ! Vim runs under MS-Windows (7, 8, 10, 11), macOS, Haiku, VMS and almost all ! flavours of UNIX. Porting to other systems should not be very difficult. ! Older versions of Vim run on MS-DOS, MS-Windows 95/98/Me/NT/2000/XP/Vista, ! Amiga DOS, Atari MiNT, BeOS, RISC OS and OS/2. These are no longer maintained. For Vim9 script see [README_VIM9](README_VIM9.md). *************** *** 128,133 **** --- 128,135 ---- ## Information ## + If you are on macOS, you can use [Macvim](https://macvim-dev.github.io/macvim/). + The latest news about Vim can be found on the Vim home page: https://www.vim.org/ *************** *** 150,157 **** This is `README.md` for version 9.0 of Vim: Vi IMproved. - - - ## Translations of this README ## - - [Korean](https://github.com/cjw1359/opensource/blob/master/Vim/README_ko.md) --- 152,154 ---- *** ../vim-9.0.0495/README.txt 2022-06-28 11:21:05.000000000 +0100 --- README.txt 2022-09-18 12:17:58.514925208 +0100 *************** *** 16,25 **** with ten fingers can work very fast. Additionally, function keys can be mapped to commands by the user, and the mouse can be used. ! Vim runs under MS-Windows (XP, Vista, 7, 8, 10), macOS, VMS and almost all flavours of UNIX. Porting to other systems should not be very difficult. ! Older versions of Vim run on MS-DOS, MS-Windows 95/98/Me/NT/2000, Amiga DOS, ! Atari MiNT, BeOS, RISC OS and OS/2. These are no longer maintained. DISTRIBUTION --- 16,25 ---- with ten fingers can work very fast. Additionally, function keys can be mapped to commands by the user, and the mouse can be used. ! Vim runs under MS-Windows (7, 8, 10, 11), macOS, Haiku, VMS and almost all flavours of UNIX. Porting to other systems should not be very difficult. ! Older versions of Vim run on MS-DOS, MS-Windows 95/98/Me/NT/2000/XP/Vista, ! Amiga DOS, Atari MiNT, BeOS, RISC OS and OS/2. These are no longer maintained. DISTRIBUTION *** ../vim-9.0.0495/runtime/doc/gui_w32.txt 2022-06-28 11:21:05.000000000 +0100 --- runtime/doc/gui_w32.txt 2022-09-18 12:17:58.514925208 +0100 *************** *** 106,113 **** You can also install Vim in the "Send To" menu: 1. Start a Windows Explorer 2. Navigate to your sendto directory: ! Windows XP: C:\Documents and Settings\%user%\SendTo ! Windows Vista: C:\Users\%user%\AppData\Roaming\Microsoft\Windows\SendTo . 3. Right-click in the file pane and select New->Shortcut 4. Follow the shortcut wizard, using the full path to VIM/GVIM. --- 106,112 ---- You can also install Vim in the "Send To" menu: 1. Start a Windows Explorer 2. Navigate to your sendto directory: ! C:\Users\%user%\AppData\Roaming\Microsoft\Windows\SendTo . 3. Right-click in the file pane and select New->Shortcut 4. Follow the shortcut wizard, using the full path to VIM/GVIM. *** ../vim-9.0.0495/runtime/doc/os_win32.txt 2022-06-28 11:21:06.000000000 +0100 --- runtime/doc/os_win32.txt 2022-09-18 12:21:30.718684080 +0100 *************** *** 7,14 **** *win32* *Win32* *MS-Windows* This file documents the idiosyncrasies of the Win32 version of Vim. ! The Win32 version of Vim works on Windows XP, Vista, 7, 8, 10 and 11. There are ! both console and GUI versions. The 32 bit version also runs on 64 bit MS-Windows systems. --- 7,17 ---- *win32* *Win32* *MS-Windows* This file documents the idiosyncrasies of the Win32 version of Vim. ! The Win32 version of Vim works on Windows 7, 8, 10 and 11. There are both ! console and GUI versions. ! ! If you have Windows XP or Vista then Vim 9.0 up to patch level 495 can be ! used. The 32 bit version also runs on 64 bit MS-Windows systems. *** ../vim-9.0.0495/src/INSTALLpc.txt 2022-06-15 18:15:26.000000000 +0100 --- src/INSTALLpc.txt 2022-09-18 12:17:58.514925208 +0100 *************** *** 12,18 **** be fine for most people. This document assumes that you are building Vim for Win32 or later (Windows ! XP/2003/Vista/7/8/10). There are also instructions for pre-XP systems, but they might no longer work. The recommended way is to build a 32 bit Vim, also on 64 bit systems. You can --- 12,18 ---- be fine for most people. This document assumes that you are building Vim for Win32 or later (Windows ! 7/8/10/11). There are also instructions for pre-Vista and pre-XP systems, but they might no longer work. The recommended way is to build a 32 bit Vim, also on 64 bit systems. You can *************** *** 42,50 **** The currently recommended way (that means it has been verified to work) is ! using the "Visual Studio Community 2015" installation. This includes the SDK ! needed to target Windows XP. But not older Windows versions (95, 98), see ! "OLDER VERSIONS" below for that. 1. Microsoft Visual C++ --- 42,50 ---- The currently recommended way (that means it has been verified to work) is ! using the "Visual Studio Community 2015" installation. This doesn't include ! the SDK for older Windows versions (95, 98), see "OLDER VERSIONS" below for ! that. 1. Microsoft Visual C++ *************** *** 52,69 **** We do not provide download links, since Microsoft keeps changing them. You can search for "Visual Studio Community 2015", for example. You will need to ! create a Microsoft account (it's free). ! When installing "Visual Studio Community 2015 with Update 3" make sure to ! select "custom" and check "Windows XP Support for C++" and all checkboxes ! under "Universal Windows App Development Tools" Visual Studio ------------- ! Building with Visual Studio (VS2010, VS2012, VS2013, VS2015, VS2017 and VS2019) ! is straightforward. To build Vim from the command line with MSVC, use Make_mvc.mak. Visual Studio installed a batch file called vcvars32.bat, which you must --- 52,73 ---- We do not provide download links, since Microsoft keeps changing them. You can search for "Visual Studio Community 2015", for example. You will need to ! create a Microsoft account (it's free). You need to download the "DVD", and ! execute the installer from it. ! When installing "Visual Studio Community 2015 with Update 3" or "Visual C++ ! Build Tools for Visual Studio 2015 with Update 3" make sure to ! select "custom" and check all checkboxes under "Universal Windows App ! Development Tools". Or whatever they are called now. ! (If you still want to target Windows XP, check also "Windows XP Support for ! C++". Note that this is no longer supported.) Visual Studio ------------- ! Building with Visual Studio (VS2010, VS2012, VS2013, VS2015, VS2017, VS2019 ! and VS2022) is straightforward. To build Vim from the command line with MSVC, use Make_mvc.mak. Visual Studio installed a batch file called vcvars32.bat, which you must *************** *** 101,106 **** --- 105,113 ---- Targeting Windows XP with MSVC 2012 and later *new-msvc-windows-xp* --------------------------------------------- + (The support for pre-Vista was removed in patch 9.0.0xxx. If you want to + target Windows XP, use the source code before that.) + Beginning with Visual C++ 2012, Microsoft changed the behavior of LINK.EXE so that it targets Windows 6.0 (Vista) by default. In order to override this, the target Windows version number needs to be passed to LINK like *************** *** 138,146 **** The following Visual C++ team blog can serve as a reference page: http://blogs.msdn.com/b/vcblog/archive/2012/10/08/windows-xp-targeting-with-c-in-visual-studio-2012.aspx - VC 2019 dropped support for targeting Windows XP. If you want a binary that - targeting Windows XP, use VC 2017 or earlier. - Cross compile support for Windows on ARM64 ------------------------------------------ --- 145,150 ---- *************** *** 153,159 **** OLDER VERSIONS ! The minimal supported version is Windows XP. Building with older compilers might still work, but these instructions might be outdated. If you need the executable to run on Windows 98 or ME, use the 2005 one --- 157,163 ---- OLDER VERSIONS ! The minimal supported version is Windows 7. Building with older compilers might still work, but these instructions might be outdated. If you need the executable to run on Windows 98 or ME, use the 2005 one *************** *** 771,782 **** nmake -f Make_mvc.mak RUBY=C:\Ruby24 DYNAMIC_RUBY=yes RUBY_VER=24 RUBY_API_VER_LONG=2.4.0 RUBY_MSVCRT_NAME=msvcrt ! WINVER=0x501 For 64-bit version, replace RUBY=C:\Ruby24 with RUBY=C:\Ruby24-x64. If you set WINVER explicitly, it must be set to >=0x500, when building ! with Ruby 2.1 or later. (Default is 0x501.) When using this trick, you also need to set RUBY_MSVCRT_NAME to msvcrt which is used for the Ruby's DLL name. --- 775,786 ---- nmake -f Make_mvc.mak RUBY=C:\Ruby24 DYNAMIC_RUBY=yes RUBY_VER=24 RUBY_API_VER_LONG=2.4.0 RUBY_MSVCRT_NAME=msvcrt ! WINVER=0x601 For 64-bit version, replace RUBY=C:\Ruby24 with RUBY=C:\Ruby24-x64. If you set WINVER explicitly, it must be set to >=0x500, when building ! with Ruby 2.1 or later. (Default is 0x601.) When using this trick, you also need to set RUBY_MSVCRT_NAME to msvcrt which is used for the Ruby's DLL name. *************** *** 787,797 **** mingw32-make -f Make_ming.mak RUBY=C:/Ruby24 DYNAMIC_RUBY=yes RUBY_VER=24 RUBY_API_VER_LONG=2.4.0 ! WINVER=0x600 For 64-bit version, replace RUBY=C:/Ruby24 with RUBY=C:/Ruby24-x64. If you set WINVER explicitly, it must be set to >=0x500, when building with ! Ruby 2.1 or later. (Default is 0x600.) --- 791,801 ---- mingw32-make -f Make_ming.mak RUBY=C:/Ruby24 DYNAMIC_RUBY=yes RUBY_VER=24 RUBY_API_VER_LONG=2.4.0 ! WINVER=0x601 For 64-bit version, replace RUBY=C:/Ruby24 with RUBY=C:/Ruby24-x64. If you set WINVER explicitly, it must be set to >=0x500, when building with ! Ruby 2.1 or later. (Default is 0x601.) *** ../vim-9.0.0495/src/Make_cyg_ming.mak 2022-09-09 10:51:14.415772399 +0100 --- src/Make_cyg_ming.mak 2022-09-18 12:17:58.514925208 +0100 *************** *** 87,96 **** # Set to yes to enable OLE support. OLE=no ! # Set the default $(WINVER). Use 0x0501 to make it work with WinXP. ifndef WINVER ! # WINVER = 0x0501 ! WINVER = 0x0600 endif # Set to yes to enable Cscope support. --- 87,95 ---- # Set to yes to enable OLE support. OLE=no ! # Set the default $(WINVER). Use 0x0601 to make it work with Windows 7. ifndef WINVER ! WINVER = 0x0601 endif # Set to yes to enable Cscope support. *************** *** 1321,1327 **** endif $(OUTDIR)/iscygpty.o: iscygpty.c $(CUI_INCL) ! $(CC) -c $(CFLAGS) iscygpty.c -o $(OUTDIR)/iscygpty.o -U_WIN32_WINNT -D_WIN32_WINNT=0x0600 -DUSE_DYNFILEID -DENABLE_STUB_IMPL $(OUTDIR)/main.o: main.c $(INCL) $(CUI_INCL) $(CC) -c $(CFLAGS) main.c -o $@ --- 1320,1326 ---- endif $(OUTDIR)/iscygpty.o: iscygpty.c $(CUI_INCL) ! $(CC) -c $(CFLAGS) iscygpty.c -o $@ $(OUTDIR)/main.o: main.c $(INCL) $(CUI_INCL) $(CC) -c $(CFLAGS) main.c -o $@ *** ../vim-9.0.0495/src/Make_mvc.mak 2022-09-09 10:51:14.415772399 +0100 --- src/Make_mvc.mak 2022-09-18 12:17:58.514925208 +0100 *************** *** 1,7 **** ! # Makefile for Vim on Win32 (Windows XP/2003/Vista/7/8/10) and Win64, ! # using the Microsoft Visual C++ compilers. Known to work with VC10 (VS2010), ! # VC11 (VS2012), VC12 (VS2013), VC14 (VS2015), VC14.1 (VS2017) and ! # VC14.2 (VS2019). # # To build using other Windows compilers, see INSTALLpc.txt # --- 1,7 ---- ! # Makefile for Vim on Win32 (Windows 7/8/10/11) and Win64, using the Microsoft ! # Visual C++ compilers. Known to work with VC10 (VS2010), VC11 (VS2012), VC12 ! # (VS2013), VC14 (VS2015), VC14.1 (VS2017), VC14.2 (VS2019) and VC14.3 ! # (VS2022). # # To build using other Windows compilers, see INSTALLpc.txt # *************** *** 128,140 **** # # Optimization: OPTIMIZE=[SPACE, SPEED, MAXSPEED] (default is MAXSPEED) # ! # Processor Version: CPUNR=[any, i586, i686, sse, sse2, avx, avx2] (default is ! # any) # avx is available on Visual C++ 2010 and after. # avx2 is available on Visual C++ 2013 Update 2 and after. # ! # Version Support: WINVER=[0x0501, 0x0502, 0x0600, 0x0601, 0x0602, ! # 0x0603, 0x0A00] (default is 0x0501) # Supported versions depends on your target SDK, check SDKDDKVer.h # See https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt # --- 128,140 ---- # # Optimization: OPTIMIZE=[SPACE, SPEED, MAXSPEED] (default is MAXSPEED) # ! # Processor Version: CPUNR=[any, i686, sse, sse2, avx, avx2] (default is ! # sse2) # avx is available on Visual C++ 2010 and after. # avx2 is available on Visual C++ 2013 Update 2 and after. # ! # Version Support: WINVER=[0x0601, 0x0602, 0x0603, 0x0A00] (default is ! # 0x0601) # Supported versions depends on your target SDK, check SDKDDKVer.h # See https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt # *************** *** 303,311 **** MSVCRT_NAME = vcruntime$(MSVCRT_VER) !endif ! ### Set the default $(WINVER) to make it work with VC++7.0 (VS.NET) !ifndef WINVER ! WINVER = 0x0501 !endif # Use multiprocess build --- 303,311 ---- MSVCRT_NAME = vcruntime$(MSVCRT_VER) !endif ! ### Set the default $(WINVER) to make it work with Windows 7 !ifndef WINVER ! WINVER = 0x0601 !endif # Use multiprocess build *************** *** 523,549 **** ### Validate CPUNR !ifndef CPUNR ! # default to untargeted code ! CPUNR = any ! !elseif "$(CPUNR)" == "i386" || "$(CPUNR)" == "i486" ! # alias i386 and i486 to i586 ! message *** WARNING CPUNR=$(CPUNR) is not a valid target architecture. ! ! message Windows XP is the minimum target OS, with a minimum target ! ! message architecture of i586. ! ! message Retargeting to i586 ! CPUNR = i586 !elseif "$(CPUNR)" == "pentium4" # alias pentium4 to sse2 ! message *** WARNING CPUNR=pentium4 is deprecated in favour of sse2. ! message Retargeting to sse2. CPUNR = sse2 ! !elseif "$(CPUNR)" != "any" && "$(CPUNR)" != "i586" && "$(CPUNR)" != "i686" && "$(CPUNR)" != "sse" && "$(CPUNR)" != "sse2" && "$(CPUNR)" != "avx" && "$(CPUNR)" != "avx2" ! error *** ERROR Unknown target architecture "$(CPUNR)". Make aborted. !endif # Convert processor ID to MVC-compatible number # IA32/SSE/SSE2 are only supported on x86 ! !if "$(ASSEMBLY_ARCHITECTURE)" == "i386" && ("$(CPUNR)" == "i586" || "$(CPUNR)" == "i686" || "$(CPUNR)" == "any") # VC<11 generates fp87 code by default ! if $(MSVC_MAJOR) < 11 CPUARG = --- 523,549 ---- ### Validate CPUNR !ifndef CPUNR ! # default to SSE2 ! CPUNR = sse2 ! !elseif "$(CPUNR)" == "i386" || "$(CPUNR)" == "i486" || "$(CPUNR)" == "i586" ! # alias i386, i486 and i586 to i686 ! message *** WARNING CPUNR=$(CPUNR) is not a valid target architecture. ! ! message Windows 7 is the minimum target OS, with a minimum target ! ! message architecture of i686. ! ! message Retargeting to i686 ! CPUNR = i686 !elseif "$(CPUNR)" == "pentium4" # alias pentium4 to sse2 ! message *** WARNING CPUNR=pentium4 is deprecated in favour of sse2. ! message Retargeting to sse2. CPUNR = sse2 ! !elseif "$(CPUNR)" != "any" && "$(CPUNR)" != "i686" && "$(CPUNR)" != "sse" && "$(CPUNR)" != "sse2" && "$(CPUNR)" != "avx" && "$(CPUNR)" != "avx2" ! error *** ERROR Unknown target architecture "$(CPUNR)". Make aborted. !endif # Convert processor ID to MVC-compatible number # IA32/SSE/SSE2 are only supported on x86 ! !if "$(ASSEMBLY_ARCHITECTURE)" == "i386" && ("$(CPUNR)" == "i686" || "$(CPUNR)" == "any") # VC<11 generates fp87 code by default ! if $(MSVC_MAJOR) < 11 CPUARG = *************** *** 1684,1690 **** $(CC) $(CFLAGS_OUTDIR) $(TCL_INC) if_tcl.c $(OUTDIR)/iscygpty.obj: $(OUTDIR) iscygpty.c $(CUI_INCL) ! $(CC) $(CFLAGS_OUTDIR) iscygpty.c -D_WIN32_WINNT=0x0600 -DUSE_DYNFILEID -DENABLE_STUB_IMPL $(OUTDIR)/job.obj: $(OUTDIR) job.c $(INCL) --- 1684,1690 ---- $(CC) $(CFLAGS_OUTDIR) $(TCL_INC) if_tcl.c $(OUTDIR)/iscygpty.obj: $(OUTDIR) iscygpty.c $(CUI_INCL) ! $(CC) $(CFLAGS_OUTDIR) iscygpty.c $(OUTDIR)/job.obj: $(OUTDIR) job.c $(INCL) *** ../vim-9.0.0495/src/os_mswin.c 2022-06-27 22:30:38.000000000 +0100 --- src/os_mswin.c 2022-09-18 12:17:58.514925208 +0100 *************** *** 1744,1756 **** # include # endif - typedef BOOL (WINAPI *pfnGetFinalPathNameByHandleW)( - HANDLE hFile, - LPWSTR lpszFilePath, - DWORD cchFilePath, - DWORD dwFlags); - static pfnGetFinalPathNameByHandleW pGetFinalPathNameByHandleW = NULL; - # define is_path_sep(c) ((c) == L'\\' || (c) == L'/') static int --- 1744,1749 ---- *************** *** 1792,1811 **** WCHAR *p, *wp; char_u *rfname = NULL; WCHAR *buff = NULL; - static BOOL loaded = FALSE; - - if (pGetFinalPathNameByHandleW == NULL) - { - HMODULE hmod = GetModuleHandle("kernel32.dll"); - - if (loaded == TRUE) - return NULL; - pGetFinalPathNameByHandleW = (pfnGetFinalPathNameByHandleW) - GetProcAddress(hmod, "GetFinalPathNameByHandleW"); - loaded = TRUE; - if (pGetFinalPathNameByHandleW == NULL) - return NULL; - } p = enc_to_utf16(fname, NULL); if (p == NULL) --- 1785,1790 ---- *************** *** 1824,1836 **** if (h == INVALID_HANDLE_VALUE) goto fail; ! size = pGetFinalPathNameByHandleW(h, NULL, 0, 0); if (size == 0) goto fail; buff = ALLOC_MULT(WCHAR, size); if (buff == NULL) goto fail; ! if (pGetFinalPathNameByHandleW(h, buff, size, 0) == 0) goto fail; if (wcsncmp(buff, L"\\\\?\\UNC\\", 8) == 0) --- 1803,1815 ---- if (h == INVALID_HANDLE_VALUE) goto fail; ! size = GetFinalPathNameByHandleW(h, NULL, 0, 0); if (size == 0) goto fail; buff = ALLOC_MULT(WCHAR, size); if (buff == NULL) goto fail; ! if (GetFinalPathNameByHandleW(h, buff, size, 0) == 0) goto fail; if (wcsncmp(buff, L"\\\\?\\UNC\\", 8) == 0) *** ../vim-9.0.0495/src/os_win32.c 2022-09-10 13:03:08.959148178 +0100 --- src/os_win32.c 2022-09-18 12:17:58.518925204 +0100 *************** *** 243,269 **** static BOOL win8_or_later = FALSE; - #if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL) - // Dynamic loading for portability - typedef struct _DYN_CONSOLE_SCREEN_BUFFER_INFOEX - { - ULONG cbSize; - COORD dwSize; - COORD dwCursorPosition; - WORD wAttributes; - SMALL_RECT srWindow; - COORD dwMaximumWindowSize; - WORD wPopupAttributes; - BOOL bFullscreenSupported; - COLORREF ColorTable[16]; - } DYN_CONSOLE_SCREEN_BUFFER_INFOEX, *PDYN_CONSOLE_SCREEN_BUFFER_INFOEX; - typedef BOOL (WINAPI *PfnGetConsoleScreenBufferInfoEx)(HANDLE, PDYN_CONSOLE_SCREEN_BUFFER_INFOEX); - static PfnGetConsoleScreenBufferInfoEx pGetConsoleScreenBufferInfoEx; - typedef BOOL (WINAPI *PfnSetConsoleScreenBufferInfoEx)(HANDLE, PDYN_CONSOLE_SCREEN_BUFFER_INFOEX); - static PfnSetConsoleScreenBufferInfoEx pSetConsoleScreenBufferInfoEx; - static BOOL has_csbiex = FALSE; - #endif - /* * Get version number including build number */ --- 243,248 ---- *************** *** 7882,7911 **** static void vtp_init(void) { ! HMODULE hKerneldll; ! DYN_CONSOLE_SCREEN_BUFFER_INFOEX csbi; # ifdef FEAT_TERMGUICOLORS COLORREF fg; # endif - // Use functions supported from Vista - hKerneldll = GetModuleHandle("kernel32.dll"); - if (hKerneldll != NULL) - { - pGetConsoleScreenBufferInfoEx = - (PfnGetConsoleScreenBufferInfoEx)GetProcAddress( - hKerneldll, "GetConsoleScreenBufferInfoEx"); - pSetConsoleScreenBufferInfoEx = - (PfnSetConsoleScreenBufferInfoEx)GetProcAddress( - hKerneldll, "SetConsoleScreenBufferInfoEx"); - if (pGetConsoleScreenBufferInfoEx != NULL - && pSetConsoleScreenBufferInfoEx != NULL) - has_csbiex = TRUE; - } - csbi.cbSize = sizeof(csbi); ! if (has_csbiex) ! pGetConsoleScreenBufferInfoEx(g_hConOut, &csbi); save_console_bg_rgb = (guicolor_T)csbi.ColorTable[g_color_index_bg]; save_console_fg_rgb = (guicolor_T)csbi.ColorTable[g_color_index_fg]; store_console_bg_rgb = save_console_bg_rgb; --- 7861,7873 ---- static void vtp_init(void) { ! CONSOLE_SCREEN_BUFFER_INFOEX csbi; # ifdef FEAT_TERMGUICOLORS COLORREF fg; # endif csbi.cbSize = sizeof(csbi); ! GetConsoleScreenBufferInfoEx(g_hConOut, &csbi); save_console_bg_rgb = (guicolor_T)csbi.ColorTable[g_color_index_bg]; save_console_fg_rgb = (guicolor_T)csbi.ColorTable[g_color_index_fg]; store_console_bg_rgb = save_console_bg_rgb; *************** *** 8134,8140 **** set_console_color_rgb(void) { # ifdef FEAT_TERMGUICOLORS ! DYN_CONSOLE_SCREEN_BUFFER_INFOEX csbi; guicolor_T fg, bg; int ctermfg, ctermbg; --- 8096,8102 ---- set_console_color_rgb(void) { # ifdef FEAT_TERMGUICOLORS ! CONSOLE_SCREEN_BUFFER_INFOEX csbi; guicolor_T fg, bg; int ctermfg, ctermbg; *************** *** 8154,8161 **** bg = (GetRValue(bg) << 16) | (GetGValue(bg) << 8) | GetBValue(bg); csbi.cbSize = sizeof(csbi); ! if (has_csbiex) ! pGetConsoleScreenBufferInfoEx(g_hConOut, &csbi); csbi.cbSize = sizeof(csbi); csbi.srWindow.Right += 1; --- 8116,8122 ---- bg = (GetRValue(bg) << 16) | (GetGValue(bg) << 8) | GetBValue(bg); csbi.cbSize = sizeof(csbi); ! GetConsoleScreenBufferInfoEx(g_hConOut, &csbi); csbi.cbSize = sizeof(csbi); csbi.srWindow.Right += 1; *************** *** 8164,8171 **** store_console_fg_rgb = csbi.ColorTable[g_color_index_fg]; csbi.ColorTable[g_color_index_bg] = (COLORREF)bg; csbi.ColorTable[g_color_index_fg] = (COLORREF)fg; ! if (has_csbiex) ! pSetConsoleScreenBufferInfoEx(g_hConOut, &csbi); # endif } --- 8125,8131 ---- store_console_fg_rgb = csbi.ColorTable[g_color_index_fg]; csbi.ColorTable[g_color_index_bg] = (COLORREF)bg; csbi.ColorTable[g_color_index_fg] = (COLORREF)fg; ! SetConsoleScreenBufferInfoEx(g_hConOut, &csbi); # endif } *************** *** 8231,8252 **** reset_console_color_rgb(void) { # ifdef FEAT_TERMGUICOLORS ! DYN_CONSOLE_SCREEN_BUFFER_INFOEX csbi; if (USE_WT) return; csbi.cbSize = sizeof(csbi); ! if (has_csbiex) ! pGetConsoleScreenBufferInfoEx(g_hConOut, &csbi); csbi.cbSize = sizeof(csbi); csbi.srWindow.Right += 1; csbi.srWindow.Bottom += 1; csbi.ColorTable[g_color_index_bg] = (COLORREF)store_console_bg_rgb; csbi.ColorTable[g_color_index_fg] = (COLORREF)store_console_fg_rgb; ! if (has_csbiex) ! pSetConsoleScreenBufferInfoEx(g_hConOut, &csbi); # endif } --- 8191,8210 ---- reset_console_color_rgb(void) { # ifdef FEAT_TERMGUICOLORS ! CONSOLE_SCREEN_BUFFER_INFOEX csbi; if (USE_WT) return; csbi.cbSize = sizeof(csbi); ! GetConsoleScreenBufferInfoEx(g_hConOut, &csbi); csbi.cbSize = sizeof(csbi); csbi.srWindow.Right += 1; csbi.srWindow.Bottom += 1; csbi.ColorTable[g_color_index_bg] = (COLORREF)store_console_bg_rgb; csbi.ColorTable[g_color_index_fg] = (COLORREF)store_console_fg_rgb; ! SetConsoleScreenBufferInfoEx(g_hConOut, &csbi); # endif } *************** *** 8257,8275 **** restore_console_color_rgb(void) { # ifdef FEAT_TERMGUICOLORS ! DYN_CONSOLE_SCREEN_BUFFER_INFOEX csbi; csbi.cbSize = sizeof(csbi); ! if (has_csbiex) ! pGetConsoleScreenBufferInfoEx(g_hConOut, &csbi); csbi.cbSize = sizeof(csbi); csbi.srWindow.Right += 1; csbi.srWindow.Bottom += 1; csbi.ColorTable[g_color_index_bg] = (COLORREF)save_console_bg_rgb; csbi.ColorTable[g_color_index_fg] = (COLORREF)save_console_fg_rgb; ! if (has_csbiex) ! pSetConsoleScreenBufferInfoEx(g_hConOut, &csbi); # endif } --- 8215,8231 ---- restore_console_color_rgb(void) { # ifdef FEAT_TERMGUICOLORS ! CONSOLE_SCREEN_BUFFER_INFOEX csbi; csbi.cbSize = sizeof(csbi); ! GetConsoleScreenBufferInfoEx(g_hConOut, &csbi); csbi.cbSize = sizeof(csbi); csbi.srWindow.Right += 1; csbi.srWindow.Bottom += 1; csbi.ColorTable[g_color_index_bg] = (COLORREF)save_console_bg_rgb; csbi.ColorTable[g_color_index_fg] = (COLORREF)save_console_fg_rgb; ! SetConsoleScreenBufferInfoEx(g_hConOut, &csbi); # endif } *** ../vim-9.0.0495/src/version.c 2022-09-18 12:00:16.260337802 +0100 --- src/version.c 2022-09-18 12:19:09.530852975 +0100 *************** *** 701,702 **** --- 701,704 ---- { /* Add new patch number below this line */ + /**/ + 496, /**/ -- There's no place like $(HOME)! /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///