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 #6082)
diff --git a/src/optionstr.c b/src/optionstr.c
index 17613a6..ff0186f 100644
--- a/src/optionstr.c
+++ b/src/optionstr.c
@@ -1157,8 +1157,11 @@
if (STRCMP(curbuf->b_p_key, oldval) != 0)
// Need to update the swapfile.
+ {
ml_set_crypt_key(curbuf, oldval,
*curbuf->b_p_cm == NUL ? p_cm : curbuf->b_p_cm);
+ changed_internal();
+ }
}
else if (gvarp == &p_cm)