fix: support large files in comparisons
Replace the 16 MiB comparison rejection with independent bounded per-side loading and frozen Working blobs. Bound diff computation, defer large inline highlighting, index source-row navigation, and expose actual load failures. Verified the real 52.3 MB parser through repository/session APIs and terminal rendering with EOF/start navigation.
This commit is contained in:
+14
-3
@@ -135,10 +135,21 @@ fn resolver_shares_native_excerpt_search_motions_and_explicit_writable_side() {
|
||||
type_text(editor, "/needle");
|
||||
editor.handle(Input::Enter);
|
||||
assert_eq!(editor.cursor().row, 70);
|
||||
let rows = editor.diff().unwrap().source_rows(Focus::Before).count();
|
||||
let rows = editor
|
||||
.diff()
|
||||
.unwrap()
|
||||
.source_rows_in(Focus::Before, 0, usize::MAX)
|
||||
.count();
|
||||
let cursor = editor.cursor();
|
||||
editor.handle(Input::Char(']'));
|
||||
assert!(editor.diff().unwrap().source_rows(Focus::Before).count() > rows);
|
||||
assert!(
|
||||
editor
|
||||
.diff()
|
||||
.unwrap()
|
||||
.source_rows_in(Focus::Before, 0, usize::MAX)
|
||||
.count()
|
||||
> rows
|
||||
);
|
||||
assert_eq!(editor.cursor(), cursor);
|
||||
type_text(editor, "21g");
|
||||
assert_eq!(editor.cursor().row, 20);
|
||||
@@ -4644,7 +4655,7 @@ fn editable_diff_brackets_expand_caret_excerpt_without_moving_source_anchor() {
|
||||
editor
|
||||
.diff()
|
||||
.unwrap()
|
||||
.source_rows(Focus::After)
|
||||
.source_rows_in(Focus::After, 0, usize::MAX)
|
||||
.collect::<Vec<_>>()
|
||||
};
|
||||
assert_eq!(
|
||||
|
||||
Reference in New Issue
Block a user