Commit a6456bc
feat: enhance file history range tracking with comprehensive overlap handling
Improved calculateWriteRanges to properly detect modified content ranges by
comparing original and modified content line-by-line instead of marking
entire files as valid.
- Added computeModifiedRanges function for precise change detection
- Added adjustHistoricalRanges for proper range adjustment after modifications
- Added comprehensive test coverage for all overlap scenarios
- Tests validate range splitting, merging, and shift calculations
- Handles partial overlaps, insertions, deletions, and edge cases
The range tracking now accurately preserves historical valid ranges while
only invalidating ranges that were actually modified.
Fixes #5871 #1374
Signed-off-by: Eric Wheeler <[email protected]>1 parent 3038da1 commit a6456bc
File tree
2 files changed
+679
-12
lines changed- src/core/file-history
- __tests__
2 files changed
+679
-12
lines changed
0 commit comments