summaryrefslogtreecommitdiff
path: root/src/gui.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-04-15 13:53:33 +0100
committerBram Moolenaar <Bram@vim.org>2022-04-15 13:53:33 +0100
commit31e5c60a682840959cae6273ccadd9aae48c928d (patch)
treea72168baa32f1899937f3937a41b0832eac66b8f /src/gui.c
parent5dc294a7b63ed0e508dd360bc4d98173f1a1aeec (diff)
downloadvim-git-31e5c60a682840959cae6273ccadd9aae48c928d.tar.gz
patch 8.2.4753: error from setting an option is silently ignoredv8.2.4753
Problem: Error from setting an option is silently ignored. Solution: Handle option value errors better. Fix uses of N_().
Diffstat (limited to 'src/gui.c')
-rw-r--r--src/gui.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui.c b/src/gui.c
index f2f541e79..2d59ea27a 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -504,7 +504,7 @@ gui_init(void)
* Reset 'paste'. It's useful in the terminal, but not in the GUI. It
* breaks the Paste toolbar button.
*/
- set_option_value((char_u *)"paste", 0L, NULL, 0);
+ set_option_value_give_err((char_u *)"paste", 0L, NULL, 0);
// Set t_Co to the number of colors: RGB.
set_color_count(256 * 256 * 256);
@@ -664,7 +664,8 @@ gui_init(void)
* Set up the fonts. First use a font specified with "-fn" or "-font".
*/
if (font_argument != NULL)
- set_option_value((char_u *)"gfn", 0L, (char_u *)font_argument, 0);
+ set_option_value_give_err((char_u *)"gfn",
+ 0L, (char_u *)font_argument, 0);
if (
#ifdef FEAT_XFONTSET
(*p_guifontset == NUL
@@ -4814,7 +4815,7 @@ init_gui_options(void)
// background color, unless the user has set it already.
if (!option_was_set((char_u *)"bg") && STRCMP(p_bg, gui_bg_default()) != 0)
{
- set_option_value((char_u *)"bg", 0L, gui_bg_default(), 0);
+ set_option_value_give_err((char_u *)"bg", 0L, gui_bg_default(), 0);
highlight_changed();
}
}