1
0
forked from aniani/vim

patch 9.0.1604: errors from the codestyle test are a bit confusing

Problem:    Errors from the codestyle test are a bit confusing.
Solution:   Use assert_report() with a clearer message.  Avoid a warning for
            an existing swap file.
This commit is contained in:
Bram Moolenaar
2023-06-04 16:55:27 +01:00
parent 3c80227760
commit abc8130d6a
3 changed files with 27 additions and 13 deletions

View File

@@ -111,9 +111,13 @@ if has("win32")
else
let s:test_script_fname = expand('%')
endif
au! SwapExists * call HandleSwapExists()
func HandleSwapExists()
if exists('g:ignoreSwapExists')
if type(g:ignoreSwapExists) == v:t_string
let v:swapchoice = g:ignoreSwapExists
endif
return
endif
" Ignore finding a swap file for the test script (the user might be