From: Bram Moolenaar Date: Fri, 27 Jan 2017 19:03:18 +0000 (+0100) Subject: patch 8.0.0244: making t_BE empty only has an effect before startup X-Git-Tag: v8.0.0244 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d9c60648e50a82dcb85b8dffb47f6416c3d56972;p=vim 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. --- diff --git a/src/option.c b/src/option.c index cc68cdfd5..a987a4cdf 100644 --- 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 diff --git a/src/version.c b/src/version.c index d86705f24..e0f23d0c9 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 244, /**/ 243, /**/