Mercurial > vim
comparison src/ex_getln.c @ 22699:e82579016863 v8.2.1898
patch 8.2.1898: command modifier parsing always uses global cmdmod
Commit: https://github.com/vim/vim/commit/e10044015841711b989f9a898d427bcc1fdb4c32
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 24 20:49:43 2020 +0200
patch 8.2.1898: command modifier parsing always uses global cmdmod
Problem: Command modifier parsing always uses global cmdmod.
Solution: Pass in cmdmod_T to use. Rename struct fields consistently.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 24 Oct 2020 21:00:05 +0200 |
parents | d7c1e3efa88e |
children | 6d50182e7e24 |
comparison
equal
deleted
inserted
replaced
22698:28523bc9ee71 | 22699:e82579016863 |
---|---|
193 incsearch_state_T *is_state, | 193 incsearch_state_T *is_state, |
194 int *skiplen, | 194 int *skiplen, |
195 int *patlen) | 195 int *patlen) |
196 { | 196 { |
197 char_u *cmd; | 197 char_u *cmd; |
198 cmdmod_T save_cmdmod = cmdmod; | 198 cmdmod_T dummy_cmdmod; |
199 char_u *p; | 199 char_u *p; |
200 int delim_optional = FALSE; | 200 int delim_optional = FALSE; |
201 int delim; | 201 int delim; |
202 char_u *end; | 202 char_u *end; |
203 char *dummy; | 203 char *dummy; |
229 ea.line1 = 1; | 229 ea.line1 = 1; |
230 ea.line2 = 1; | 230 ea.line2 = 1; |
231 ea.cmd = ccline.cmdbuff; | 231 ea.cmd = ccline.cmdbuff; |
232 ea.addr_type = ADDR_LINES; | 232 ea.addr_type = ADDR_LINES; |
233 | 233 |
234 parse_command_modifiers(&ea, &dummy, TRUE); | 234 CLEAR_FIELD(dummy_cmdmod); |
235 cmdmod = save_cmdmod; | 235 parse_command_modifiers(&ea, &dummy, &dummy_cmdmod, TRUE); |
236 | 236 |
237 cmd = skip_range(ea.cmd, TRUE, NULL); | 237 cmd = skip_range(ea.cmd, TRUE, NULL); |
238 if (vim_strchr((char_u *)"sgvl", *cmd) == NULL) | 238 if (vim_strchr((char_u *)"sgvl", *cmd) == NULL) |
239 goto theend; | 239 goto theend; |
240 | 240 |
4161 // When using completion in Insert mode with <C-R>=<C-F> one can open the | 4161 // When using completion in Insert mode with <C-R>=<C-F> one can open the |
4162 // command line window, but we don't want the popup menu then. | 4162 // command line window, but we don't want the popup menu then. |
4163 pum_undisplay(); | 4163 pum_undisplay(); |
4164 | 4164 |
4165 // don't use a new tab page | 4165 // don't use a new tab page |
4166 cmdmod.tab = 0; | 4166 cmdmod.cmod_tab = 0; |
4167 cmdmod.noswapfile = 1; | 4167 cmdmod.cmod_flags |= CMOD_NOSWAPFILE; |
4168 | 4168 |
4169 // Create a window for the command-line buffer. | 4169 // Create a window for the command-line buffer. |
4170 if (win_split((int)p_cwh, WSP_BOT) == FAIL) | 4170 if (win_split((int)p_cwh, WSP_BOT) == FAIL) |
4171 { | 4171 { |
4172 beep_flush(); | 4172 beep_flush(); |