comparison src/fileio.c @ 2410:8f6106dd3d12 vim73

Fix: editing a not encrypted file after a crypted file messed up reading the text from an undo file.
author Bram Moolenaar <bram@vim.org>
date Sun, 25 Jul 2010 16:05:19 +0200
parents a3aca345aafa
children 88751831fa0a
comparison
equal deleted inserted replaced
2409:0ca06a92adfb 2410:8f6106dd3d12
2951 (size_t)*sizep); 2951 (size_t)*sizep);
2952 } 2952 }
2953 } 2953 }
2954 /* When starting to edit a new file which does not have encryption, clear 2954 /* When starting to edit a new file which does not have encryption, clear
2955 * the 'key' option, except when starting up (called with -x argument) */ 2955 * the 'key' option, except when starting up (called with -x argument) */
2956 else if (newfile && *curbuf->b_p_key && !starting) 2956 else if (newfile && *curbuf->b_p_key != NUL && !starting)
2957 set_option_value((char_u *)"key", 0L, (char_u *)"", OPT_LOCAL); 2957 set_option_value((char_u *)"key", 0L, (char_u *)"", OPT_LOCAL);
2958 2958
2959 return cryptkey; 2959 return cryptkey;
2960 } 2960 }
2961 2961