To: vim-dev@vim.org Subject: patch 5.5.026 Fcc: outbox From: Bram Moolenaar ------------ Patch 5.5.026 Problem: When starting Vim in a white-on-black xterm, with 'bg' set to "dark", and then starting the GUI with ":gui", setting 'bg' to "light" in the gvimrc, the highlighting isn't set. (Tsjokwing) Solution: Set the highlighting when 'bg' is changed in the gvimrc, even though full_screen isn't set. Files: src/option.c *** ../vim-5.5.25/src/option.c Tue Oct 12 19:55:31 1999 --- src/option.c Sun Oct 17 16:33:10 1999 *************** *** 1907,1926 **** void init_gui_options() { - int tt; - /* Set the 'background' option according to the lightness of the * background color. */ if (!option_was_set((char_u *)"bg") && gui_mch_get_lightness(gui.back_pixel) < 127) { - /* Full_screen must be TRUE to get the side effect of changing the - * defaults for the highlighting. Restore it just in case. */ - tt = full_screen; - full_screen = TRUE; set_option_value((char_u *)"bg", 0L, (char_u *)"dark"); highlight_changed(); - full_screen = tt; } } #endif --- 1907,1919 ---- *************** *** 3040,3049 **** else if (varp == &p_bg) { if (check_opt_strings(p_bg, p_bg_values, FALSE) == OK) ! { ! if (full_screen) ! init_highlight(FALSE); ! } else errmsg = e_invarg; } --- 3033,3039 ---- else if (varp == &p_bg) { if (check_opt_strings(p_bg, p_bg_values, FALSE) == OK) ! init_highlight(FALSE); else errmsg = e_invarg; } *** ../vim-5.5.25/src/version.c Sun Oct 17 15:45:09 1999 --- src/version.c Sun Oct 17 16:42:25 1999 *************** *** 420,420 **** --- 420,421 ---- { /* Add new patch number below this line */ + 26, -- User: I'm having problems with my text editor. Help desk: Which editor are you using? User: I don't know, but it's version VI (pronounced: 6). Help desk: Oh, then you should upgrade to version VIM (pronounced: 994). --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\-- \ \ www.vim.org/iccf www.moolenaar.net www.vim.org / /