File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -44,20 +44,19 @@ fun! PhpCsFixerFix(path, dry_run)
44
44
exec ' edit!'
45
45
endif
46
46
let s: nbLines = len (split (s: output , ' \n' ))
47
- let s: nbFilesModified = (s: nbLines - 1 )
48
47
49
48
if g: php_cs_fixer_verbose == 1
50
49
echohl Title | echo s: output | echohl None
51
50
else
52
- if s: nbFilesModified > 0
53
- echohl Title | echo " There is " . s: nbFilesModified ." file(s) modified(s)" | echohl None
51
+ if s: nbLines > 0
52
+ echohl Title | echo s: nbLines ." file(s) modified(s)" | echohl None
54
53
else
55
54
echohl Title | echo " There is no cs to fix" | echohl None
56
55
endif
57
56
endif
58
57
59
58
" if there is no cs to fix, we have not to ask for remove dry run
60
- if a: dry_run == 1 && s: nbFilesModified > 0
59
+ if a: dry_run == 1 && s: nbLines > 0
61
60
let l: confirmed = confirm (" Do you want to launch command without dry-run option ?" , " &Yes\n &No" , 2 )
62
61
if l: confirmed == 1
63
62
call PhpCsFixerFix (a: path , 0 )
You can’t perform that action at this time.
0 commit comments