diff options
author | erw7 <erw7.github@gmail.com> | 2019-05-27 19:05:11 +0900 |
---|---|---|
committer | erw7 <erw7.github@gmail.com> | 2019-06-04 09:53:55 +0900 |
commit | 485972dd64317e6a09ce7694cf0f903fb6d13cbd (patch) | |
tree | 6817fab9149d8969ad3eebda7727f29c5b8dcaf9 /src/nvim/ex_docmd.c | |
parent | 16b1e8f9c070ad853c6c63b43591e297bf512662 (diff) | |
download | rneovim-485972dd64317e6a09ce7694cf0f903fb6d13cbd.tar.gz rneovim-485972dd64317e6a09ce7694cf0f903fb6d13cbd.tar.bz2 rneovim-485972dd64317e6a09ce7694cf0f903fb6d13cbd.zip |
vim-patch:8.1.0629: "gn" selects the wrong text with a multi-line match
Problem: "gn" selects the wrong text with a multi-line match.
Solution: Get the end position from searchit() directly. (closes vim/vim#3695)
https://github.com/vim/vim/commit/5d24a2257e597fd752e33b2c1e9c19cf9114a517
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index ec4b16fbb0..16118d642b 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -3750,12 +3750,12 @@ static linenr_T get_address(exarg_T *eap, // Start the search just like for the above do_search(). pos.col = (*cmd != '?') ? MAXCOL : 0; pos.coladd = 0; - if (searchit(curwin, curbuf, &pos, + if (searchit(curwin, curbuf, &pos, NULL, *cmd == '?' ? BACKWARD : FORWARD, (char_u *)"", 1L, SEARCH_MSG, - i, (linenr_T)0, NULL, NULL) != FAIL) + i, (linenr_T)0, NULL, NULL) != FAIL) { lnum = pos.lnum; - else { + } else { cmd = NULL; goto error; } |