diff options
author | Ghjuvan Lacambre <code@lacamb.re> | 2021-04-04 20:43:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-04 14:43:22 -0400 |
commit | 0f187700ab1437e949f03d6915df7c76f8287304 (patch) | |
tree | 235da971e8133a11ad3b3aa3ef077370564521ea /src/nvim/tag.c | |
parent | 76f5c72860b237d66c949dcdeb6967047810b956 (diff) | |
download | rneovim-0f187700ab1437e949f03d6915df7c76f8287304.tar.gz rneovim-0f187700ab1437e949f03d6915df7c76f8287304.tar.bz2 rneovim-0f187700ab1437e949f03d6915df7c76f8287304.zip |
vim-patch:8.2.0295: highlighting for :s wrong when using different separator (#14286)
Problem: Highlighting for :s wrong when using different separator.
Solution: Use separat argument for search direction and separator. (Rob
Pilling, closes vim/vim#5665)
https://github.com/vim/vim/commit/c036e87bd7001238ab7cc5d9e30e59bbf989a5fd
Diffstat (limited to 'src/nvim/tag.c')
-rw-r--r-- | src/nvim/tag.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/nvim/tag.c b/src/nvim/tag.c index 6b8f393572..588821f260 100644 --- a/src/nvim/tag.c +++ b/src/nvim/tag.c @@ -2811,7 +2811,7 @@ static int jumpto_tag( // start search before first line curwin->w_cursor.lnum = 0; } - if (do_search(NULL, pbuf[0], pbuf + 1, (long)1, + if (do_search(NULL, pbuf[0], pbuf[0], pbuf + 1, (long)1, search_options, NULL)) { retval = OK; } else { @@ -2821,8 +2821,8 @@ static int jumpto_tag( /* * try again, ignore case now */ - p_ic = TRUE; - if (!do_search(NULL, pbuf[0], pbuf + 1, (long)1, + p_ic = true; + if (!do_search(NULL, pbuf[0], pbuf[0], pbuf + 1, (long)1, search_options, NULL)) { // Failed to find pattern, take a guess: "^func (" found = 2; @@ -2830,11 +2830,12 @@ static int jumpto_tag( cc = *tagp.tagname_end; *tagp.tagname_end = NUL; snprintf((char *)pbuf, LSIZE, "^%s\\s\\*(", tagp.tagname); - if (!do_search(NULL, '/', pbuf, (long)1, search_options, NULL)) { + if (!do_search(NULL, '/', '/', pbuf, (long)1, search_options, NULL)) { // Guess again: "^char * \<func (" snprintf((char *)pbuf, LSIZE, "^\\[#a-zA-Z_]\\.\\*\\<%s\\s\\*(", tagp.tagname); - if (!do_search(NULL, '/', pbuf, (long)1, search_options, NULL)) { + if (!do_search(NULL, '/', '/', pbuf, (long)1, + search_options, NULL)) { found = 0; } } |