To: vim-dev@vim.org Subject: Patch 6.1.296 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.296 Problem: Win32: When cancelling the font dialog 'guifont' remains set to "*". Solution: Restore the old value of 'guifont' (Yasuhiro Matsumoto) Files: src/option.c *** ../vim61.295/src/option.c Thu Jan 9 22:01:16 2003 --- src/option.c Thu Jan 9 21:58:20 2003 *************** *** 4833,4844 **** errmsg = (char_u *)""; } # endif ! if (errmsg == NULL && gui_init_font(p_guifont, FALSE) != OK # if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_PHOTON) ! && STRCMP(p_guifont, "*") != 0 # endif ! ) ! errmsg = (char_u *)N_("Invalid font(s)"); } } # ifdef FEAT_XFONTSET --- 4835,4856 ---- errmsg = (char_u *)""; } # endif ! if (errmsg == NULL && gui_init_font(p_guifont, FALSE) != OK) ! { # if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_PHOTON) ! if (STRCMP(p_guifont, "*") == 0) ! { ! /* Dialog was cancelled: Keep the old value without giving ! * an error message. */ ! if (new_value_alloced) ! free_string_option(p_guifont); ! p_guifont = vim_strsave(oldval); ! new_value_alloced = TRUE; ! } ! else # endif ! errmsg = (char_u *)N_("Invalid font(s)"); ! } } } # ifdef FEAT_XFONTSET *** ../vim61.295/src/version.c Sun Jan 19 19:45:38 2003 --- src/version.c Sun Jan 19 19:47:19 2003 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 296, /**/ -- The average life of an organization chart is six months. You can safely ignore any order from your boss that would take six months to complete. (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///