vim-patch:8.2.3579: CI sometimes fails for MinGW

Problem:    CI sometimes fails for MinGW.
Solution:   Use backslashes in HandleSwapExists(). (Christian Brabandt,
            closes vim/vim#9078)

4b2c804767

Co-authored-by: Christian Brabandt <cb@256bit.org>
(cherry picked from commit 24bd7a4a9c)
This commit is contained in:
zeertzjq
2024-07-16 10:53:54 +08:00
committed by github-actions[bot]
parent f0790c565c
commit 2010f398f4

View File

@ -95,7 +95,12 @@ set encoding=utf-8
" REDIR_TEST_TO_NULL has a very permissive SwapExists autocommand which is for
" the test_name.vim file itself. Replace it here with a more restrictive one,
" so we still catch mistakes.
let s:test_script_fname = expand('%')
if has("win32")
" replace any '/' directory separators by '\\'
let s:test_script_fname = substitute(expand('%'), '/', '\\', 'g')
else
let s:test_script_fname = expand('%')
endif
au! SwapExists * call HandleSwapExists()
func HandleSwapExists()
if exists('g:ignoreSwapExists')