Skip to content

Commit 9fde8a8

Browse files
committed
Allow blank entry to cancel code coverage file prompt, fix #26
When accidentally summoning the prompt for a code coverage file, it now hints that you can leave it blank to cancel the request. This stops the incredibly annoying infinite loop.
1 parent 664e39a commit 9fde8a8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

autoload/Phpqa.vim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,12 @@ function! Phpqa#PhpCodeCoverage()
223223

224224
let file_tmp = ""
225225
while 0 == len(g:phpqa_codecoverage_file)
226-
let file_tmp = resolve(expand(input("Please specify a clover code coverage XML file: ",file_tmp,"file")))
226+
let file_tmp = resolve(expand(input("Please specify a clover code coverage XML file (leave blank to cancel): ",file_tmp,"file")))
227227
if filereadable(file_tmp)
228228
let g:phpqa_codecoverage_file = file_tmp
229+
elseif file_tmp == ""
230+
echo "Cancelled"
231+
break
229232
else
230233
echohl Error |echo "Not a valid or readable file"|echohl None
231234
endif

0 commit comments

Comments
 (0)