Skip to content

Fix regression in ProjectionViewer.setVisibleRegion for empty ranges#3671

Merged
vogella merged 1 commit into
eclipse-platform:masterfrom
danthe1st:fix-3667
Jan 13, 2026
Merged

Fix regression in ProjectionViewer.setVisibleRegion for empty ranges#3671
vogella merged 1 commit into
eclipse-platform:masterfrom
danthe1st:fix-3667

Conversation

@danthe1st

@danthe1st danthe1st commented Jan 13, 2026

Copy link
Copy Markdown
Contributor

Commit 59dbd43 introduced a regression where setVisibleRegion(0, 0) would expand to include the full line, causing SegmentedModeTest.testShowNothing to fail. This change ensures that empty ranges (length 0) are not expanded to the end of the line, restoring the previous behavior for this case while keeping the fix for partial lines (length > 0).

In addition to that, this PR prevents the last line from being included/shown when the end character is directly after the line break.

This is an extended version of #3670 (I also copied most of the description from there)
Fixes #3667

Commit 59dbd43 introduced a regression where setVisibleRegion(0, 0)
would expand to include the full line, causing
SegmentedModeTest.testShowNothing to fail. This change ensures that
empty ranges (length 0) are not expanded to the end of the line,
restoring the previous behavior for this case while keeping the fix for
partial lines (length > 0).

Co-authored-by: Lars Vogel <Lars.Vogel@vogella.com>
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

 3 015 files  ±0   3 015 suites  ±0   2h 17m 14s ⏱️ - 5m 6s
 8 268 tests +2   8 020 ✅ +3  248 💤 ±0  0 ❌  - 1 
23 628 runs  +6  22 837 ✅ +7  791 💤 ±0  0 ❌  - 1 

Results for commit de0e8aa. ± Comparison against base commit 3d42a70.

@vogella vogella merged commit 79881b2 into eclipse-platform:master Jan 13, 2026
18 checks passed
@vogella

vogella commented Jan 13, 2026

Copy link
Copy Markdown
Contributor

Thanks @danthe1st

@danthe1st danthe1st deleted the fix-3667 branch January 13, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SegmentedModeTest.testShowNothing fails since I20260112-1800

2 participants