changeset 12994:8566eaa08788 v8.0.1373

patch 8.0.1373: no error when settting 'renderoptions' before starting GUI commit https://github.com/vim/vim/commit/3767c6e9ee1bd585a2afba7e932854b24d194a2d Author: Bram Moolenaar <Bram@vim.org> Date: Tue Dec 5 16:57:56 2017 +0100 patch 8.0.1373: no error when settting 'renderoptions' before starting GUI Problem: No error when settting 'renderoptions' to an invalid value before starting the GUI. Solution: Always check the value. (Ken Takata, closes #2413)
author Christian Brabandt <cb@256bit.org>
date Tue, 05 Dec 2017 17:00:08 +0100
parents 8a97cfc76c7e
children 814c18a298a9
files src/gui_w32.c src/option.c src/version.c
diffstat 3 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -127,6 +127,9 @@ gui_mch_set_rendering_options(char_u *s)
 	    return FAIL;
     }
 
+    if (!gui.in_use)
+	return OK;  /* only checking the syntax of the value */
+
     /* Enable DirectX/DirectWrite */
     if (dx_enable)
     {
--- a/src/option.c
+++ b/src/option.c
@@ -7406,7 +7406,7 @@ did_set_string_option(
 
 #if defined(FEAT_RENDER_OPTIONS)
     /* 'renderoptions' */
-    else if (varp == &p_rop && gui.in_use)
+    else if (varp == &p_rop)
     {
 	if (!gui_mch_set_rendering_options(p_rop))
 	    errmsg = e_invarg;
--- a/src/version.c
+++ b/src/version.c
@@ -772,6 +772,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1373,
+/**/
     1372,
 /**/
     1371,