To: vim-dev@vim.org Subject: patch 5.5.034 Fcc: outbox From: Bram Moolenaar ------------ Patch 5.5.034 Problem: "gvim -rv" caused a crash. Using 't_Co' before it's set. Solution: Don't try to initilize the highlighting before it has been initilized from main(). Files: src/syntax.c *** ../vim-5.5.33/src/syntax.c Sun Oct 24 20:24:38 1999 --- src/syntax.c Sun Oct 31 14:27:45 1999 *************** *** 4787,4799 **** --- 4787,4806 ---- { int i; char **pp; + static int had_both = FALSE; if (both) { + had_both = TRUE; pp = highlight_init_both; for (i = 0; pp[i] != NULL; ++i) do_highlight((char_u *)pp[i], FALSE, TRUE); } + else if (!had_both) + /* Don't do anything before the call with both == TRUE from main(). + * Not everything has been setup then, and that call will overrule + * everything anyway. */ + return; if (TO_LOWER(*p_bg) == 'l') pp = highlight_init_light; *** ../vim-5.5.33/src/version.c Sun Oct 31 14:29:00 1999 --- src/version.c Sun Oct 31 14:26:05 1999 *************** *** 420,420 **** --- 420,421 ---- { /* Add new patch number below this line */ + 34, -- hundred-and-one symptoms of being an internet addict: 30. Even though you died last week, you've managed to retain OPS on your favorite IRC channel. --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\-- \ \ www.vim.org/iccf www.moolenaar.net www.vim.org / /