mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 05:58:33 +00:00
vim-patch:8.1.1823: command line history code is spread out (#19688)
Problem: Command line history code is spread out.
Solution: Put the code in a new file. (Yegappan Lakshmanan, closes vim/vim#4779)
Also graduate the +cmdline_hist feature.
d7663c22c6
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "nvim/buffer.h"
|
||||
#include "nvim/change.h"
|
||||
#include "nvim/charset.h"
|
||||
#include "nvim/cmdhist.h"
|
||||
#include "nvim/cursor.h"
|
||||
#include "nvim/diff.h"
|
||||
#include "nvim/digraph.h"
|
||||
@@ -4379,9 +4380,11 @@ static void nv_ident(cmdarg_T *cap)
|
||||
&& vim_iswordp(mb_prevptr(get_cursor_line_ptr(), ptr))) {
|
||||
STRCAT(buf, "\\>");
|
||||
}
|
||||
|
||||
// put pattern in search history
|
||||
init_history();
|
||||
add_to_history(HIST_SEARCH, (char_u *)buf, true, NUL);
|
||||
|
||||
(void)normal_search(cap, cmdchar == '*' ? '/' : '?', (char_u *)buf, 0,
|
||||
NULL);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user