提交 a9fbb055 编写于 作者: S Steve Klabnik

Rollup merge of #31281 - oli-obk:patch-2, r=nikomatsakis

......@@ -516,7 +516,7 @@ fn end_highlight_lines(&mut self,
};
let lo = self.cm.lookup_char_pos(sp.lo);
let hi = self.cm.lookup_char_pos(sp.hi);
let elide_sp = (lo.line - hi.line) > MAX_SP_LINES;
let elide_sp = (hi.line - lo.line) >= MAX_SP_LINES;
let line_num = line.line_index + 1;
if !(lo.line <= line_num && hi.line >= line_num) {
......@@ -1024,7 +1024,7 @@ fn test_huge_multispan_highlight() {
\x20 ^ ^\n";
let expect0_end = "dummy.txt: 5 ccccc\n\
\x20 ...\n\
dummy.txt: 6 xxxxx\n\
dummy.txt: 7 yyyyy\n\
\x20 ^\n\
\x20 ...\n\
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册