Mercurial > vim
comparison src/search.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 | f8bf2c122452 |
children | 875bd7c04533 |
comparison
equal
deleted
inserted
replaced
22698:28523bc9ee71 | 22699:e82579016863 |
---|---|
187 | 187 |
188 /* | 188 /* |
189 * Save the currently used pattern in the appropriate place, | 189 * Save the currently used pattern in the appropriate place, |
190 * unless the pattern should not be remembered. | 190 * unless the pattern should not be remembered. |
191 */ | 191 */ |
192 if (!(options & SEARCH_KEEP) && !cmdmod.keeppatterns) | 192 if (!(options & SEARCH_KEEP) |
193 && (cmdmod.cmod_flags & CMOD_KEEPPATTERNS) == 0) | |
193 { | 194 { |
194 // search or global command | 195 // search or global command |
195 if (pat_save == RE_SEARCH || pat_save == RE_BOTH) | 196 if (pat_save == RE_SEARCH || pat_save == RE_BOTH) |
196 save_re_pat(RE_SEARCH, pat, magic); | 197 save_re_pat(RE_SEARCH, pat, magic); |
197 // substitute or global command | 198 // substitute or global command |
1659 setpcmark(); | 1660 setpcmark(); |
1660 curwin->w_cursor = pos; | 1661 curwin->w_cursor = pos; |
1661 curwin->w_set_curswant = TRUE; | 1662 curwin->w_set_curswant = TRUE; |
1662 | 1663 |
1663 end_do_search: | 1664 end_do_search: |
1664 if ((options & SEARCH_KEEP) || cmdmod.keeppatterns) | 1665 if ((options & SEARCH_KEEP) || (cmdmod.cmod_flags & CMOD_KEEPPATTERNS)) |
1665 spats[0].off = old_off; | 1666 spats[0].off = old_off; |
1666 vim_free(strcopy); | 1667 vim_free(strcopy); |
1667 vim_free(msgbuf); | 1668 vim_free(msgbuf); |
1668 | 1669 |
1669 return retval; | 1670 return retval; |