File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 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
907907 call writefile ([v: exception ], has (' win32' ) ? ' conout$' : ' /dev/stderr' )
908908 cquit
909909 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
910919endfunction
911920
912921call s: main ()
Original file line number Diff line number Diff line change @@ -879,6 +879,15 @@ function! s:main() abort
879879 call writefile ([v: exception ], has (' win32' ) ? ' conout$' : ' /dev/stderr' )
880880 cquit
881881 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
882891endfunction
883892
884893call s: main ()
You can’t perform that action at this time.
0 commit comments