comparison src/optionstr.c @ 20415:b582eb6ef192 v8.2.0762

patch 8.2.0762: buffer is not considered modified after setting crypt key Commit: https://github.com/vim/vim/commit/76cb68309794def0fa7d1f2f72dd694b822186a5 Author: Bram Moolenaar <Bram@vim.org> Date: Fri May 15 22:30:38 2020 +0200 patch 8.2.0762: buffer is not considered modified after setting crypt key Problem: Buffer is not considered modified after setting crypt key. Solution: Set the modified flag. (Christian Brabandt, closes https://github.com/vim/vim/issues/6082)
author Bram Moolenaar <Bram@vim.org>
date Fri, 15 May 2020 22:45:04 +0200
parents 9a67d41708d2
children 054ba681412d
comparison
equal deleted inserted replaced
20414:cbf8715299d8 20415:b582eb6ef192
1155 // history. 1155 // history.
1156 remove_key_from_history(); 1156 remove_key_from_history();
1157 1157
1158 if (STRCMP(curbuf->b_p_key, oldval) != 0) 1158 if (STRCMP(curbuf->b_p_key, oldval) != 0)
1159 // Need to update the swapfile. 1159 // Need to update the swapfile.
1160 {
1160 ml_set_crypt_key(curbuf, oldval, 1161 ml_set_crypt_key(curbuf, oldval,
1161 *curbuf->b_p_cm == NUL ? p_cm : curbuf->b_p_cm); 1162 *curbuf->b_p_cm == NUL ? p_cm : curbuf->b_p_cm);
1163 changed_internal();
1164 }
1162 } 1165 }
1163 1166
1164 else if (gvarp == &p_cm) 1167 else if (gvarp == &p_cm)
1165 { 1168 {
1166 if (opt_flags & OPT_LOCAL) 1169 if (opt_flags & OPT_LOCAL)