diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-06-14 21:57:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-14 21:57:08 +0800 |
commit | 8ba64dd3ad1822efd6f986349e99f5f85afd7be7 (patch) | |
tree | 66b2987707cf6616614fb251d7e342ccdfd96c28 /src/nvim/ex_getln.c | |
parent | 2a2fb8be74f9147773416be63334ea6a74c66869 (diff) | |
parent | 0a0cda95286bf62fbce2776a0c0081cea39a88a8 (diff) | |
download | rneovim-8ba64dd3ad1822efd6f986349e99f5f85afd7be7.tar.gz rneovim-8ba64dd3ad1822efd6f986349e99f5f85afd7be7.tar.bz2 rneovim-8ba64dd3ad1822efd6f986349e99f5f85afd7be7.zip |
Merge pull request #18947 from zeertzjq/vim-8.2.1897
vim-patch:8.2.{1897,1898,5088}
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r-- | src/nvim/ex_getln.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 3210660f14..3065dc462b 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -309,7 +309,6 @@ static bool do_incsearch_highlighting(int firstc, int *search_delim, incsearch_s FUNC_ATTR_NONNULL_ALL { char *cmd; - cmdmod_T save_cmdmod = cmdmod; char *p; bool delim_optional = false; int delim; @@ -346,8 +345,8 @@ static bool do_incsearch_highlighting(int firstc, int *search_delim, incsearch_s ea.cmd = (char *)ccline.cmdbuff; ea.addr_type = ADDR_LINES; - parse_command_modifiers(&ea, &dummy, true); - cmdmod = save_cmdmod; + cmdmod_T dummy_cmdmod; + parse_command_modifiers(&ea, &dummy, &dummy_cmdmod, true); cmd = skip_range(ea.cmd, NULL); if (vim_strchr("sgvl", *cmd) == NULL) { @@ -2433,9 +2432,9 @@ static void cmdpreview_show(CommandLineState *s) curwin->w_p_cul = false; // Disable 'cursorline' so it doesn't mess up the highlights curwin->w_p_cuc = false; // Disable 'cursorcolumn' so it doesn't mess up the highlights p_hls = false; // Don't show search highlighting during live substitution - cmdmod.split = 0; // Disable :leftabove/botright modifiers - cmdmod.tab = 0; // Disable :tab modifier - cmdmod.noswapfile = true; // Disable swap for preview buffer + cmdmod.cmod_split = 0; // Disable :leftabove/botright modifiers + cmdmod.cmod_tab = 0; // Disable :tab modifier + cmdmod.cmod_flags |= CMOD_NOSWAPFILE; // Disable swap for preview buffer // Open preview buffer if inccommand=split. if (!icm_split) { @@ -6074,7 +6073,7 @@ void add_to_history(int histype, char_u *new_entry, int in_map, int sep) } assert(histype != HIST_DEFAULT); - if (cmdmod.keeppatterns && histype == HIST_SEARCH) { + if ((cmdmod.cmod_flags & CMOD_KEEPPATTERNS) && histype == HIST_SEARCH) { return; } @@ -6604,8 +6603,8 @@ static int open_cmdwin(void) pum_undisplay(true); // don't use a new tab page - cmdmod.tab = 0; - cmdmod.noswapfile = 1; + cmdmod.cmod_tab = 0; + cmdmod.cmod_flags |= CMOD_NOSWAPFILE; // Create a window for the command-line buffer. if (win_split((int)p_cwh, WSP_BOT) == FAIL) { |