Skip to content

Commit bf66211

Browse files
committed
[highlighter] when highlighting the body, use the end position instead of length
Related to #1546
1 parent c3f9335 commit bf66211

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/highlighter.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ highlighter::annotate(attr_line_t& al, const line_range& lr) const
7979
const auto sf = string_fragment::from_str_range(
8080
str,
8181
lr.lr_start,
82-
std::min(size_t{8192}, std::min((size_t) lr.length(), str.size())));
82+
std::min(size_t{8192}, std::min((size_t) lr.lr_end, str.size())));
8383

8484
if (!sf.is_valid()) {
8585
return;

0 commit comments

Comments
 (0)