comparison src/normal.c @ 15239:db5d2429bda3 v8.1.0629

patch 8.1.0629: "gn" selects the wrong text with a multi-line match commit https://github.com/vim/vim/commit/5d24a2257e597fd752e33b2c1e9c19cf9114a517 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Dec 23 19:10:09 2018 +0100 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 https://github.com/vim/vim/issues/3695)
author Bram Moolenaar <Bram@vim.org>
date Sun, 23 Dec 2018 19:15:05 +0100
parents 3a94f7918980
children 54457fc4af0b
comparison
equal deleted inserted replaced
15238:85705008bb7a 15239:db5d2429bda3
4336 /* Search forward for the identifier, ignore comment lines. */ 4336 /* Search forward for the identifier, ignore comment lines. */
4337 CLEAR_POS(&found_pos); 4337 CLEAR_POS(&found_pos);
4338 for (;;) 4338 for (;;)
4339 { 4339 {
4340 valid = FALSE; 4340 valid = FALSE;
4341 t = searchit(curwin, curbuf, &curwin->w_cursor, FORWARD, 4341 t = searchit(curwin, curbuf, &curwin->w_cursor, NULL, FORWARD,
4342 pat, 1L, searchflags, RE_LAST, (linenr_T)0, NULL, NULL); 4342 pat, 1L, searchflags, RE_LAST, (linenr_T)0, NULL, NULL);
4343 if (curwin->w_cursor.lnum >= old_pos.lnum) 4343 if (curwin->w_cursor.lnum >= old_pos.lnum)
4344 t = FAIL; /* match after start is failure too */ 4344 t = FAIL; /* match after start is failure too */
4345 4345
4346 if (thisblock && t != FAIL) 4346 if (thisblock && t != FAIL)