comparison src/search.c @ 1557:811f29447aea v7.1.270

updated for version 7.1-270
author vimboss
date Mon, 10 Mar 2008 20:34:59 +0000
parents fc42d9cc7ad0
children 18ee39301b82
comparison
equal deleted inserted replaced
1556:1c597397f006 1557:811f29447aea
536 if ((options & SEARCH_MSG) && !rc_did_emsg) 536 if ((options & SEARCH_MSG) && !rc_did_emsg)
537 EMSG2(_("E383: Invalid search string: %s"), mr_pattern); 537 EMSG2(_("E383: Invalid search string: %s"), mr_pattern);
538 return FAIL; 538 return FAIL;
539 } 539 }
540 540
541 if (options & SEARCH_START) 541 /* When not accepting a match at the start position set "extra_col" to a
542 * non-zero value. Don't do that when starting at MAXCOL, since MAXCOL +
543 * 1 is zero. */
544 if ((options & SEARCH_START) || pos->col == MAXCOL)
542 extra_col = 0; 545 extra_col = 0;
543 #ifdef FEAT_MBYTE 546 #ifdef FEAT_MBYTE
544 /* Watch out for the "col" being MAXCOL - 2, used in a closed fold. */ 547 /* Watch out for the "col" being MAXCOL - 2, used in a closed fold. */
545 else if (has_mbyte && pos->lnum >= 1 && pos->lnum <= buf->b_ml.ml_line_count 548 else if (has_mbyte && pos->lnum >= 1 && pos->lnum <= buf->b_ml.ml_line_count
546 && pos->col < MAXCOL - 2) 549 && pos->col < MAXCOL - 2)