To: vim_dev@googlegroups.com Subject: Patch 8.2.2446 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2446 Problem: Setting 'term' empty has different error if compiled with GUI. Solution: Insert "else". (closes #7766) Files: src/optionstr.c, src/testdir/test_options.vim *** ../vim-8.2.2445/src/optionstr.c 2020-10-26 21:05:23.905469139 +0100 --- src/optionstr.c 2021-02-01 18:34:33.488519307 +0100 *************** *** 687,693 **** if (T_NAME[0] == NUL) errmsg = N_("E529: Cannot set 'term' to empty string"); #ifdef FEAT_GUI ! if (gui.in_use) errmsg = N_("E530: Cannot change term in GUI"); else if (term_is_gui(T_NAME)) errmsg = N_("E531: Use \":gui\" to start the GUI"); --- 687,693 ---- if (T_NAME[0] == NUL) errmsg = N_("E529: Cannot set 'term' to empty string"); #ifdef FEAT_GUI ! else if (gui.in_use) errmsg = N_("E530: Cannot change term in GUI"); else if (term_is_gui(T_NAME)) errmsg = N_("E531: Use \":gui\" to start the GUI"); *** ../vim-8.2.2445/src/testdir/test_options.vim 2021-01-17 13:47:59.890514158 +0100 --- src/testdir/test_options.vim 2021-02-01 18:37:10.647946838 +0100 *************** *** 484,495 **** set ttytype=xterm call assert_equal('xterm', &ttytype) call assert_equal(&ttytype, &term) - " "set ttytype=" gives E522 instead of E529 - " in travis on some builds. Why? Catch both for now try set ttytype= call assert_report('set ttytype= did not fail') ! catch /E529\|E522/ endtry " Some systems accept any terminal name and return dumb settings, --- 484,493 ---- set ttytype=xterm call assert_equal('xterm', &ttytype) call assert_equal(&ttytype, &term) try set ttytype= call assert_report('set ttytype= did not fail') ! catch /E529/ endtry " Some systems accept any terminal name and return dumb settings, *** ../vim-8.2.2445/src/version.c 2021-01-31 22:18:21.981811091 +0100 --- src/version.c 2021-02-01 18:36:02.332194174 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2446, /**/ -- Facepalm statement #6: "Estland is a fantasy place, just like Middle Earth and Madagaskar" /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///