0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.0.0364: ]s does not move cursor with two spell errors in one line

Problem:    ]s does not move cursor with two spell errors in one line. (Manuel
            Ortega)
Solution:   Don't stop search immediately when wrapped, search the line first.
            (Ken Takata)  Add a test.
This commit is contained in:
Bram Moolenaar
2017-02-25 14:21:10 +01:00
parent 3834e3d039
commit d3f78dc9eb
5 changed files with 30 additions and 6 deletions

View File

@@ -1734,14 +1734,14 @@ spell_move_to(
if (curline)
break; /* only check cursor line */
/* If we are back at the starting line and searched it again there
* is no match, give up. */
if (lnum == wp->w_cursor.lnum && wrapped)
break;
/* Advance to next line. */
if (dir == BACKWARD)
{
/* If we are back at the starting line and searched it again there
* is no match, give up. */
if (lnum == wp->w_cursor.lnum && wrapped)
break;
if (lnum > 1)
--lnum;
else if (!p_ws)
@@ -1775,7 +1775,7 @@ spell_move_to(
/* If we are back at the starting line and there is no match then
* give up. */
if (lnum == wp->w_cursor.lnum && (!found_one || wrapped))
if (lnum == wp->w_cursor.lnum && !found_one)
break;
/* Skip the characters at the start of the next line that were