Safer loop for skipping consecutive concealed chars

This commit is contained in:
Tommy Allen
2018-01-27 00:20:18 -05:00
parent be7990bb49
commit 2eb8dc40ac

View File

@@ -699,11 +699,12 @@ static int mouse_adjust_click(win_T *wp, int row, int col)
} }
prev_matchid = matchid; prev_matchid = matchid;
do {
while (prev_matchid == matchid && *ptr != NUL) {
incr(); incr();
ptr += utfc_ptr2len(ptr); ptr += utfc_ptr2len(ptr);
matchid = syn_get_concealed_id(wp, lnum, (colnr_T)(ptr - line)); matchid = syn_get_concealed_id(wp, lnum, (colnr_T)(ptr - line));
} while (prev_matchid == matchid); }
continue; continue;
} }