Skip to content

Commit

Permalink
Fix loop when displaying search result if regex matches an empty string
Browse files Browse the repository at this point in the history
Closes #866
  • Loading branch information
koutcher committed Dec 14, 2018
1 parent 629f9a5 commit 560c6b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ draw_view_line_search_result(struct view *view, unsigned int lineno)
regoff_t end = pmatch[0].rm_eo;

if (start == -1 || end <= 0 || end <= start)
continue;
break;

mvwchgat(view->win, lineno,
utf8_width_of(buf, bufpos + start, -1),
Expand Down

0 comments on commit 560c6b6

Please sign in to comment.