File tree 2 files changed +18
-0
lines changed 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -907,6 +907,15 @@ function! s:main() abort
907
907
call writefile ([v: exception ], has (' win32' ) ? ' conout$' : ' /dev/stderr' )
908
908
cquit
909
909
endtry
910
+ if mode (1 ) == # ' ce'
911
+ " This :visual is needed to make exit code 0 for old vim.
912
+ " Exit code is set to 1, Vim exit from Ex mode after an error
913
+ " output is performed even if the error is caught by try-catch.
914
+ "
915
+ " This problem is fixed at Vim v.8.0.0184.
916
+ " https://github.com/vim/vim/releases/tag/v8.0.0184
917
+ visual
918
+ endif
910
919
endfunction
911
920
912
921
call s: main ()
Original file line number Diff line number Diff line change @@ -879,6 +879,15 @@ function! s:main() abort
879
879
call writefile ([v: exception ], has (' win32' ) ? ' conout$' : ' /dev/stderr' )
880
880
cquit
881
881
endtry
882
+ if mode (1 ) == # ' ce'
883
+ " This :visual is needed to make exit code 0 for old vim.
884
+ " Exit code is set to 1, Vim exit from Ex mode after an error
885
+ " output is performed even if the error is caught by try-catch.
886
+ "
887
+ " This problem is fixed at Vim v.8.0.0184.
888
+ " https://github.com/vim/vim/releases/tag/v8.0.0184
889
+ visual
890
+ endif
882
891
endfunction
883
892
884
893
call s: main ()
You can’t perform that action at this time.
0 commit comments