refactor: hide logical comparison rows from painting
This commit is contained in:
+3
-2
@@ -1,4 +1,5 @@
|
||||
use super::*;
|
||||
use crate::diff::RowKind;
|
||||
use crate::plugin::TextPosition;
|
||||
use std::{
|
||||
fs,
|
||||
@@ -2403,7 +2404,7 @@ fn diff_scope_labels_identify_multiple_scopes_and_sticky_renamed_sides() {
|
||||
assert_eq!(rows[0].scope, [true; 2]);
|
||||
assert_eq!(rows[1].scope, [false; 2]);
|
||||
assert_eq!(rows[0].position, rows[1].position);
|
||||
let first = diff_screen_rows(&diff, diff.top, 48, Some(rows))
|
||||
let first = diff_screen_rows(diff.display_rows.len(), diff.top, 48, Some(rows))
|
||||
.next()
|
||||
.unwrap();
|
||||
assert_eq!((first.0, first.1), (1, diff.top));
|
||||
@@ -3054,7 +3055,7 @@ fn local_review_highlights_exact_graphemes_newlines_clips_and_wrap_continuations
|
||||
let gutter = diff_gutter(&diff, file, content.width as usize, focus);
|
||||
let width = content.width as usize - gutter;
|
||||
for (screen, display, segments) in
|
||||
diff_screen_rows(&diff, 0, content.height, wrapped)
|
||||
diff_screen_rows(diff.display_rows.len(), 0, content.height, wrapped)
|
||||
{
|
||||
let mut expected = vec![false; width];
|
||||
if let DisplayRow::Line(aligned) = diff.display_rows[display] {
|
||||
|
||||
Reference in New Issue
Block a user