Problem: Matchstrpos() without a match returns too many items.
Solution: Also remove the second item when the position is beyond the end of
the string. (Hirohito Higashi) Use an enum for the type.
8d9f0ef5c6
Problem: Using 'hlsearch' highlighting instead of matchpos if there is no
search match.
Solution: Pass NULL as last item to next_search_hl() when searching for
'hlsearch' match. (Shane Harper, closesvim/vim#1013)
e17bdffff7
Problem: When using matchaddpos() a character after the end of the line can
be highlighted.
Solution: Only highlight existing characters. (Hirohito Higashi)
4f416e4124