Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't modify topIndex in handleTextChanged if control has not the focus #1617

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tobiasmelcher
Copy link
Contributor

fix split screen issue eclipse-platform/eclipse.platform.ui#2142 by not setting StyledText#topIndex if the control has not the focus.

@tobiasmelcher
Copy link
Contributor Author

@mickaelistria would you prefer that we delete the complete if-block "if (!isFixedLineHeight() && topIndex > firstLine) {" or is the approach of this pull request also fine?

Copy link
Contributor

Test Results

   480 files   -  3     480 suites   - 3   8m 31s ⏱️ - 4m 3s
 4 060 tests  - 35   4 052 ✅  - 33   4 💤  - 3  4 ❌ +1 
16 138 runs   - 35  16 044 ✅  - 36  87 💤  - 3  7 ❌ +4 

For more details on these failures, see this check.

Results for commit c12914b. ± Comparison against base commit e6588c2.

This pull request removes 35 tests.
org.eclipse.swt.graphics.ImageWin32Tests ‑ testImageShouldHaveDimesionAsPerZoomLevel
org.eclipse.swt.tests.win32.Test_org_eclipse_swt_dnd_DND ‑ testByteArrayTransfer
org.eclipse.swt.tests.win32.Test_org_eclipse_swt_dnd_DND ‑ testFileTransfer
org.eclipse.swt.tests.win32.Test_org_eclipse_swt_dnd_DND ‑ testHtmlTransfer
org.eclipse.swt.tests.win32.Test_org_eclipse_swt_dnd_DND ‑ testImageTransfer_fromCopiedImage
org.eclipse.swt.tests.win32.Test_org_eclipse_swt_dnd_DND ‑ testImageTransfer_fromImage
org.eclipse.swt.tests.win32.Test_org_eclipse_swt_dnd_DND ‑ testImageTransfer_fromImageData
org.eclipse.swt.tests.win32.Test_org_eclipse_swt_dnd_DND ‑ testImageTransfer_fromImageDataFromImage
org.eclipse.swt.tests.win32.Test_org_eclipse_swt_dnd_DND ‑ testRtfTransfer
org.eclipse.swt.tests.win32.Test_org_eclipse_swt_dnd_DND ‑ testTextTransfer
…

@vogella
Copy link
Contributor

vogella commented Nov 24, 2024

We should try to delete the code that we do not know why it is there (eclipse-platform/eclipse.platform.ui#2142) early in the next release cycle to find if this causes any yet unknown issues.

@mickaelistria
Copy link
Contributor

This PR looks good.

We should try to delete the code that we do not know why it is there

Here I think the reason for this code are clear enough: it can happen while editing some lines of non fixed height that the current position of the topIndex doesn't allow to see the whole first edited line. So I think it's best to keep it as proposed.

@BeckerWdf BeckerWdf added this to the 4.35 M1 milestone Nov 25, 2024
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.

5 participants