- Timestamp:
- Sep 18, 2010, 5:07:40 PM (14 years ago)
- Branches:
- master, release-1.10, release-1.7, release-1.8, release-1.9
- Children:
- b6cf72f
- Parents:
- a728387
- git-author:
- David Benjamin <davidben@mit.edu> (08/15/10 19:40:03)
- git-committer:
- David Benjamin <davidben@mit.edu> (09/18/10 17:07:40)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
viewwin.c
r09ceee3 r9c1e61d4 300 300 * found. 301 301 * 302 * If mode==0 then stay on the current line if it matches. 302 * If mode is OWL_SEARCH_MATCH_CURRENT then stay on the current line 303 * if it matches. 303 304 */ 304 305 int owl_viewwin_search(owl_viewwin *v, const owl_regex *re, int mode, int direction) … … 309 310 owl_fmtext_line_extents(&v->fmtext, v->topline, &start, &end); 310 311 if (direction == OWL_DIRECTION_DOWNWARDS) { 311 offset = owl_fmtext_search(&v->fmtext, re, mode ? end : start); 312 offset = owl_fmtext_search(&v->fmtext, re, 313 (mode == OWL_SEARCH_CONTINUE) ? end : start); 312 314 if (offset < 0) 313 315 return 0; … … 321 323 * them. */ 322 324 buf = owl_fmtext_get_text(&v->fmtext); 323 lineend = mode? start : end;325 lineend = (mode == OWL_SEARCH_CONTINUE) ? start : end; 324 326 while (lineend > 0) { 325 327 linestartp = memrchr(buf, '\n', lineend - 1);
Note: See TracChangeset
for help on using the changeset viewer.