changeset 10708:4940a195bd1f v8.0.0244

patch 8.0.0244: making t_BE empty only has an effect before startup commit https://github.com/vim/vim/commit/d9c60648e50a82dcb85b8dffb47f6416c3d56972 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jan 27 20:03:18 2017 +0100 patch 8.0.0244: making t_BE empty only has an effect before startup Problem: When the user sets t_BE empty after startup to disable bracketed paste, this has no direct effect. Solution: When t_BE is made empty write t_BD. When t_BE is made non-empty write the new value.
author Christian Brabandt <cb@256bit.org>
date Fri, 27 Jan 2017 20:15:04 +0100
parents fd34823307a3
children 34574f134873
files src/option.c src/version.c
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/option.c
+++ b/src/option.c
@@ -6619,6 +6619,15 @@ did_set_string_option(
 	    mch_set_normal_colors();
 #endif
 	}
+	if (varp == &T_BE && termcap_active)
+	{
+	    if (*T_BE == NUL)
+		/* When clearing t_BE we assume the user no longer wants
+		 * bracketed paste, thus disable it by writing t_BD. */
+		out_str(T_BD);
+	    else
+		out_str(T_BE);
+	}
     }
 
 #ifdef FEAT_LINEBREAK
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    244,
+/**/
     243,
 /**/
     242,