Community
Participate
Working Groups
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
(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