To: vim-dev@vim.org Subject: Patch 6.0.260 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.0.260 Problem: GUI: May crash while starting up when giving an error message for missing color. (Servatius Brandt) Solution: Don't call gui_write() when still starting up. Don't give error message for empty color name. Don't use 't_vb' while the GUI is still starting up. Files: src/fileio.c, src/gui.c, src/misc1.c, src/ui.c *** ../vim60.259/src/fileio.c Thu Feb 21 21:49:21 2002 --- src/fileio.c Fri Feb 22 12:21:37 2002 *************** *** 654,660 **** #endif #ifdef FEAT_GUI /* Also write a message in the GUI window, if there is one. */ ! if (gui.in_use) { p = (char_u *)_("Reading from stdin..."); gui_write(p, (int)STRLEN(p)); --- 658,664 ---- #endif #ifdef FEAT_GUI /* Also write a message in the GUI window, if there is one. */ ! if (gui.in_use && !gui.dying && !gui.starting) { p = (char_u *)_("Reading from stdin..."); gui_write(p, (int)STRLEN(p)); *** ../vim60.259/src/gui.c Thu Feb 21 21:19:59 2002 --- src/gui.c Fri Feb 22 12:27:02 2002 *************** *** 3687,3692 **** --- 3687,3694 ---- { guicolor_T t; + if (*name == NUL) + return (guicolor_T)-1; t = gui_mch_get_color(name); if (t < 0 #if defined(FEAT_GUI_X11) || defined(FEAT_GUI_GTK) *** ../vim60.259/src/misc1.c Mon Feb 18 17:18:18 2002 --- src/misc1.c Fri Feb 22 12:26:10 2002 *************** *** 2725,2731 **** { if (emsg_silent == 0) { ! if (p_vb) { out_str(T_VB); } --- 2725,2737 ---- { if (emsg_silent == 0) { ! if (p_vb ! #ifdef FEAT_GUI ! /* While the GUI is starting up the termcap is set for the GUI ! * but the output still goes to a terminal. */ ! && !(gui.in_use && gui.starting) ! #endif ! ) { out_str(T_VB); } *** ../vim60.259/src/ui.c Mon Feb 11 15:45:47 2002 --- src/ui.c Fri Feb 22 12:16:49 2002 *************** *** 24,30 **** int len; { #ifdef FEAT_GUI ! if (gui.in_use && !gui.dying) { gui_write(s, len); if (p_wd) --- 24,30 ---- int len; { #ifdef FEAT_GUI ! if (gui.in_use && !gui.dying && !gui.starting) { gui_write(s, len); if (p_wd) *** ../vim60.259/src/version.c Fri Feb 22 11:18:37 2002 --- src/version.c Fri Feb 22 12:30:06 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 260, /**/ -- I think that you'll agree that engineers are very effective in their social interactions. It's the "normal" people who are nuts. (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///