diff src/option.c @ 12242:25361fe94f94 v8.0.1001

patch 8.0.1001: setting 'encoding' makes 'printheader' invalid commit https://github.com/vim/vim/commit/0903d56f5ca69bb1fa0bbb00ed2a3d9c4d06ddb4 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 26 22:30:15 2017 +0200 patch 8.0.1001: setting 'encoding' makes 'printheader' invalid Problem: Setting 'encoding' makes 'printheader' invalid. Solution: Do not translate the default value of 'printheader'. (Yasuhiro Matsumoto, closes #2026)
author Christian Brabandt <cb@256bit.org>
date Sat, 26 Aug 2017 22:45:04 +0200
parents 497b78526358
children 48eac9bc2f82
line wrap: on
line diff
--- a/src/option.c
+++ b/src/option.c
@@ -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}