]> granicus.if.org Git - vim/commitdiff
patch 8.0.0244: making t_BE empty only has an effect before startup v8.0.0244
authorBram Moolenaar <Bram@vim.org>
Fri, 27 Jan 2017 19:03:18 +0000 (20:03 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 27 Jan 2017 19:03:18 +0000 (20:03 +0100)
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.

src/option.c
src/version.c

index cc68cdfd5b8c11f2651e1053ac42cda77a3cf8b5..a987a4cdf88540752ca0901d496e552bcf63e5a0 100644 (file)
@@ -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
index d86705f24129312cf31e7150a5d68a5118f9fdb1..e0f23d0c9e7dd241f4be3ab83c3f6a71f1f61dd4 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    244,
 /**/
     243,
 /**/