Summary: | Rendering code-mining / line spacing should keep caret position unchanged. | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Mickael Istria <mistria> |
Component: | SWT | Assignee: | Mickael Istria <mistria> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | CC: | Lars.Vogel, sarika.sinha |
Version: | 4.19 | ||
Target Milestone: | 4.19 M1 | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.eclipse.org/bugs/show_bug.cgi?id=553849 https://git.eclipse.org/r/c/platform/eclipse.platform.text/+/173561 https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/173663 https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=e0cdeb9f02df25e419adcab3555771a5670c70b3 https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/173710 https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=8609014a40ef3012cdcf853223319df5a25097e3 |
||
Whiteboard: | |||
Bug Depends on: | |||
Bug Blocks: | 553849, 569124 |
Description
Mickael Istria
2020-12-08 09:29:50 EST
(In reply to Mickael Istria from comment #0) > When increasing the line height for code mining, the text area should be > changed so that the caret and the current line remain at the same location. > Basically, the visible area should be shifted/scrolled getLineHeight() > pixels down if possible Did not understand exactly what do you mean by shifting getLineHeight() pixels down ? (In reply to Sarika Sinha from comment #1) > Did not understand exactly what do you mean by shifting getLineHeight() > pixels down ? Yes, I think I poorly explained it. The idea is that we try to get the caret position fixed. So when we are in a scrollable editor and a code mining is added above the current line, we change the area by y+=lineHeight (shift lineHeight pixels down), so the final caret position is not modified, nor is the current line. Things move "around" the current line, not on the current line. And similarly, when removing a code mining, we draw change the area to be the right amounst of pixels "higher" so the current line and caret are not perceived as moving. New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.text/+/173561 This is probably more something to handle at SWT level, when invoking StyledText.setLineVerticalIndent. Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/173663 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=e0cdeb9f02df25e419adcab3555771a5670c70b3 Founds some cases where patch isn't working as expected. New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/173710 Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/173710 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=8609014a40ef3012cdcf853223319df5a25097e3 |