patch 8.1.1823: command line history code is spread out
Problem: Command line history code is spread out.
Solution: Put the code in a new file. (Yegappan Lakshmanan, closes #4779)
Also graduate the +cmdline_hist feature.
diff --git a/src/option.c b/src/option.c
index bf253a4..4ad558a 100644
--- a/src/option.c
+++ b/src/option.c
@@ -6745,11 +6745,10 @@
/* 'cryptkey' */
else if (gvarp == &p_key)
{
-# if defined(FEAT_CMDHIST)
- /* Make sure the ":set" command doesn't show the new value in the
- * history. */
+ // Make sure the ":set" command doesn't show the new value in the
+ // history.
remove_key_from_history();
-# endif
+
if (STRCMP(curbuf->b_p_key, oldval) != 0)
/* Need to update the swapfile. */
ml_set_crypt_key(curbuf, oldval,