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/normal.c b/src/normal.c
index acc5b64..f717e8c 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -5736,11 +5736,11 @@
? vim_iswordp(mb_prevptr(ml_get_curline(), ptr))
: vim_iswordc(ptr[-1])))
STRCAT(buf, "\\>");
-#ifdef FEAT_CMDHIST
- /* put pattern in search history */
+
+ // put pattern in search history
init_history();
add_to_history(HIST_SEARCH, buf, TRUE, NUL);
-#endif
+
(void)normal_search(cap, cmdchar == '*' ? '/' : '?', buf, 0);
}
else