]> granicus.if.org Git - vim/commitdiff
patch 8.0.1001: setting 'encoding' makes 'printheader' invalid v8.0.1001
authorBram Moolenaar <Bram@vim.org>
Sat, 26 Aug 2017 20:30:15 +0000 (22:30 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 26 Aug 2017 20:30:15 +0000 (22:30 +0200)
Problem:    Setting 'encoding' makes 'printheader' invalid.
Solution:   Do not translate the default value of 'printheader'. (Yasuhiro
            Matsumoto, closes #2026)

src/option.c
src/version.c

index 61d35798346756b3807318c02d5e6dc0f363dcc9..90a11bce3a897a3aaadd1c9e79445caa20311176 100644 (file)
@@ -2196,7 +2196,9 @@ static struct vimoption options[] =
     {"printheader", "pheader",  P_STRING|P_VI_DEF|P_GETTEXT,
 #ifdef FEAT_PRINTER
                            (char_u *)&p_header, PV_NONE,
-                           {(char_u *)N_("%<%f%h%m%=Page %N"), (char_u *)0L}
+                           /* untranslated to avoid problems when 'encoding'
+                            * is changed */
+                           {(char_u *)"%<%f%h%m%=Page %N", (char_u *)0L}
 #else
                            (char_u *)NULL, PV_NONE,
                            {(char_u *)NULL, (char_u *)0L}
index e229f41775da0113ec30519e5e61197f83215586..f8eb49111e514276d1a157cb7c76dc47f5ed22a0 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1001,
 /**/
     1000,
 /**/