Skip to content

Commit 24d9efa

Browse files
authored
Merge pull request #3240 from codecrafters-io/fix-collapse-unchanged
Fix `collapseUnchanged` hiding changed lines in some diffs
2 parents a31afbe + 60ca376 commit 24d9efa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/utils/code-mirror-collapse-unchanged.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ const ChunkField = StateField.define<readonly Chunk[]>({
129129

130130
function buildCollapsedRanges(state: EditorState, margin: number, minLines: number) {
131131
const builder = new RangeSetBuilder<Decoration>();
132-
const isA = true; // state.facet(mergeConfig).side == 'a';
132+
const isA = false; // state.facet(mergeConfig).side == 'a';
133133
const chunks = state.field(ChunkField);
134134
let prevLine = 1;
135135

tests/acceptance/course-admin/view-diffs-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ module('Acceptance | course-admin | view-diffs', function (hooks) {
103103

104104
assert.strictEqual(
105105
submissionsPage.diffTab.changedFiles[0].codeMirror.content.collapsedLinesPlaceholders[2].text,
106-
'Expand 9 unchanged lines',
106+
'Expand 7 unchanged lines',
107107
'The third placeholder should show correct number of lines',
108108
);
109109

0 commit comments

Comments
 (0)