comparison src/search.c @ 45:e474bae3795f

updated for version 7.0027
author vimboss
date Fri, 31 Dec 2004 20:58:58 +0000
parents 125e80798a85
children 8f25c0d2210f
comparison
equal deleted inserted replaced
44:af1bcb9a13c0 45:e474bae3795f
2365 int c; 2365 int c;
2366 int (*func) __ARGS((pos_T *)); 2366 int (*func) __ARGS((pos_T *));
2367 int startlnum; 2367 int startlnum;
2368 int noskip = FALSE; /* do not skip blanks */ 2368 int noskip = FALSE; /* do not skip blanks */
2369 int cpo_J; 2369 int cpo_J;
2370 int found_dot;
2370 2371
2371 pos = curwin->w_cursor; 2372 pos = curwin->w_cursor;
2372 if (dir == FORWARD) 2373 if (dir == FORWARD)
2373 func = incl; 2374 func = incl;
2374 else 2375 else
2402 } 2403 }
2403 else if (dir == BACKWARD) 2404 else if (dir == BACKWARD)
2404 decl(&pos); 2405 decl(&pos);
2405 2406
2406 /* go back to the previous non-blank char */ 2407 /* go back to the previous non-blank char */
2408 found_dot = FALSE;
2407 while ((c = gchar_pos(&pos)) == ' ' || c == '\t' || 2409 while ((c = gchar_pos(&pos)) == ' ' || c == '\t' ||
2408 (dir == BACKWARD && vim_strchr((char_u *)".!?)]\"'", c) != NULL)) 2410 (dir == BACKWARD && vim_strchr((char_u *)".!?)]\"'", c) != NULL))
2409 { 2411 {
2412 if (vim_strchr((char_u *)".!?", c) != NULL)
2413 {
2414 /* Only skip over a '.', '!' and '?' once. */
2415 if (found_dot)
2416 break;
2417 found_dot = TRUE;
2418 }
2410 if (decl(&pos) == -1) 2419 if (decl(&pos) == -1)
2411 break; 2420 break;
2412 /* when going forward: Stop in front of empty line */ 2421 /* when going forward: Stop in front of empty line */
2413 if (lineempty(pos.lnum) && dir == FORWARD) 2422 if (lineempty(pos.lnum) && dir == FORWARD)
2414 { 2423 {
3313 { 3322 {
3314 ncount = count; 3323 ncount = count;
3315 if (start_blank) 3324 if (start_blank)
3316 --ncount; 3325 --ncount;
3317 } 3326 }
3318 if (ncount) 3327 if (ncount > 0)
3319 findsent_forward(ncount, TRUE); 3328 findsent_forward(ncount, TRUE);
3320 else 3329 else
3321 decl(&curwin->w_cursor); 3330 decl(&curwin->w_cursor);
3322 3331
3323 if (include) 3332 if (include)