]> granicus.if.org Git - vim/commitdiff
patch 8.2.4798: t_8u option was reset even when set by the user v8.2.4798
authorBram Moolenaar <Bram@vim.org>
Wed, 20 Apr 2022 18:08:50 +0000 (19:08 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 20 Apr 2022 18:08:50 +0000 (19:08 +0100)
Problem:    t_8u option was reset even when set by the user.
Solution:   Only reset t_8u when using the default value. (closes #10239)

src/term.c
src/version.c

index abc8a383ec5369c46d803e13c3432bcd72f5f12f..0f80e9c40bada6c8124b4615186fb58eede752bb 100644 (file)
@@ -4826,7 +4826,9 @@ handle_version_response(int first, int *arg, int argc, char_u *tp)
        // This may cause some flicker.  Alternative would be to set "t_8u"
        // here if the terminal is expected to support it, but that might
        // conflict with what was set in the .vimrc.
-       if (term_props[TPR_UNDERLINE_RGB].tpr_status != TPR_YES && *T_8U != NUL)
+       if (term_props[TPR_UNDERLINE_RGB].tpr_status != TPR_YES
+                       && *T_8U != NUL
+                       && !option_was_set((char_u *)"t_8u"))
        {
            set_string_option_direct((char_u *)"t_8u", -1, (char_u *)"",
                                                                  OPT_FREE, 0);
index 6bed251bb1910865a6abd77137f4c17294ae1eee..83d8e1b4958a05b685bfe1646adf5a5224fa54df 100644 (file)
@@ -746,6 +746,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4798,
 /**/
     4797,
 /**/