chore: Remove debugging logs
This commit is contained in:
parent
cfd060b66d
commit
4d459ea160
3 changed files with 0 additions and 8 deletions
|
|
@ -592,7 +592,6 @@ impl SyntaxHighlighter {
|
||||||
|
|
||||||
styles.push((node_range, theme.style(name.as_ref()).unwrap_or_default()));
|
styles.push((node_range, theme.style(name.as_ref()).unwrap_or_default()));
|
||||||
}
|
}
|
||||||
// dbg!(iter_count);
|
|
||||||
|
|
||||||
// If the matched styles is empty, return a default range.
|
// If the matched styles is empty, return a default range.
|
||||||
if styles.len() == 0 {
|
if styles.len() == 0 {
|
||||||
|
|
|
||||||
|
|
@ -578,9 +578,6 @@ impl TextElement {
|
||||||
.get(visible_range.start + ix)
|
.get(visible_range.start + ix)
|
||||||
.expect("line should exists in text_wrapper");
|
.expect("line should exists in text_wrapper");
|
||||||
|
|
||||||
// if line_item.len() != line.len() {
|
|
||||||
// dbg!(&line, &line_item.wrapped_lines);
|
|
||||||
// }
|
|
||||||
debug_assert_eq!(line_item.len(), line.len());
|
debug_assert_eq!(line_item.len(), line.len());
|
||||||
|
|
||||||
let mut line_layout = LineLayout::new();
|
let mut line_layout = LineLayout::new();
|
||||||
|
|
|
||||||
|
|
@ -213,15 +213,12 @@ impl TextWrapper {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// dbg!(&new_lines.len());
|
|
||||||
// dbg!(self.lines.len());
|
|
||||||
if self.lines.len() == 0 {
|
if self.lines.len() == 0 {
|
||||||
self.lines = new_lines;
|
self.lines = new_lines;
|
||||||
} else {
|
} else {
|
||||||
self.lines.splice(rows_range, new_lines);
|
self.lines.splice(rows_range, new_lines);
|
||||||
}
|
}
|
||||||
|
|
||||||
// dbg!(self.lines.len());
|
|
||||||
self.text = changed_text.clone();
|
self.text = changed_text.clone();
|
||||||
self.soft_lines = self.lines.iter().map(|l| l.lines_len()).sum();
|
self.soft_lines = self.lines.iter().map(|l| l.lines_len()).sum();
|
||||||
self.longest_row = LongestRow {
|
self.longest_row = LongestRow {
|
||||||
|
|
@ -467,7 +464,6 @@ mod tests {
|
||||||
text.to_string(),
|
text.to_string(),
|
||||||
"AAA, 世界!\r\nThis is second line.\nThis is third line.\n这里是第 4 行。New text"
|
"AAA, 世界!\r\nThis is second line.\nThis is third line.\n这里是第 4 行。New text"
|
||||||
);
|
);
|
||||||
dbg!(&wrapper.lines);
|
|
||||||
assert_eq!(wrapper.lines.len(), 4);
|
assert_eq!(wrapper.lines.len(), 4);
|
||||||
assert_wrapper_lines(
|
assert_wrapper_lines(
|
||||||
&text,
|
&text,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue