1
0
forked from aniani/vim

updated for version 7.0027

This commit is contained in:
Bram Moolenaar
2004-12-31 20:58:58 +00:00
parent dfccaf0f00
commit def9e829de
9 changed files with 117 additions and 35 deletions

View File

@@ -2367,6 +2367,7 @@ findsent(dir, count)
int startlnum;
int noskip = FALSE; /* do not skip blanks */
int cpo_J;
int found_dot;
pos = curwin->w_cursor;
if (dir == FORWARD)
@@ -2404,9 +2405,17 @@ findsent(dir, count)
decl(&pos);
/* go back to the previous non-blank char */
found_dot = FALSE;
while ((c = gchar_pos(&pos)) == ' ' || c == '\t' ||
(dir == BACKWARD && vim_strchr((char_u *)".!?)]\"'", c) != NULL))
{
if (vim_strchr((char_u *)".!?", c) != NULL)
{
/* Only skip over a '.', '!' and '?' once. */
if (found_dot)
break;
found_dot = TRUE;
}
if (decl(&pos) == -1)
break;
/* when going forward: Stop in front of empty line */
@@ -3315,7 +3324,7 @@ extend:
if (start_blank)
--ncount;
}
if (ncount)
if (ncount > 0)
findsent_forward(ncount, TRUE);
else
decl(&curwin->w_cursor);