comparison src/message.c @ 29775:455e7588b979 v9.0.0227

patch 9.0.0227: cannot read error message when abort() is called Commit: https://github.com/vim/vim/commit/213e70e284b0975dd34525e94e59e26811097c72 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 19 13:17:21 2022 +0100 patch 9.0.0227: cannot read error message when abort() is called Problem: Cannot read error message when abort() is called. Solution: Output a newline before calling abort().
author Bram Moolenaar <Bram@vim.org>
date Fri, 19 Aug 2022 14:30:03 +0200
parents 2d2f36e430f9
children 68ef14b21d01
comparison
equal deleted inserted replaced
29774:7749e69fb61f 29775:455e7588b979
829 if (!emsg_not_now()) 829 if (!emsg_not_now())
830 { 830 {
831 emsg_core((char_u *)s); 831 emsg_core((char_u *)s);
832 #if defined(ABORT_ON_INTERNAL_ERROR) && defined(FEAT_EVAL) 832 #if defined(ABORT_ON_INTERNAL_ERROR) && defined(FEAT_EVAL)
833 set_vim_var_string(VV_ERRMSG, (char_u *)s, -1); 833 set_vim_var_string(VV_ERRMSG, (char_u *)s, -1);
834 msg_putchar('\n'); // avoid overwriting the error message
835 out_flush();
834 abort(); 836 abort();
835 #endif 837 #endif
836 } 838 }
837 } 839 }
838 840
861 va_start(ap, s); 863 va_start(ap, s);
862 vim_vsnprintf((char *)IObuff, IOSIZE, s, ap); 864 vim_vsnprintf((char *)IObuff, IOSIZE, s, ap);
863 va_end(ap); 865 va_end(ap);
864 emsg_core(IObuff); 866 emsg_core(IObuff);
865 } 867 }
866 }
867 # ifdef ABORT_ON_INTERNAL_ERROR 868 # ifdef ABORT_ON_INTERNAL_ERROR
868 abort(); 869 msg_putchar('\n'); // avoid overwriting the error message
870 out_flush();
871 abort();
869 # endif 872 # endif
873 }
870 } 874 }
871 #endif 875 #endif
872 876
873 /* 877 /*
874 * Give an "Internal error" message. 878 * Give an "Internal error" message.