Community
Participate
Working Groups
When the caret goes out of the viewport by pressing one of arrow keys, the viewport doesn't move with the caret. The viewport should 'follow' the caret if the caret location has been changed by the arrow keys.
Created attachment 25686 [details] patch for GraphicalTextViewer This updates the viewport when the caret goes off the current viewport. It scrolls the viewport if needed. The actual calculation is done in refreshViewport (and refreshViewportX). refreshViewportX method looks unnecessarily public; I am using that method to fix another bug:) we haven't figured out what to do with the copyright, so I didn't add anything to the contributor list.
This particular case now works in the text example, however it's not fool-proof yet. 1) In the logic example, when direct-editing, exposing just the caret is not good enough. You might have to scroll nested viewports. 2) I've added revealCaret() to GraphicalTextViewer, but it should actually be changed so that it reveals the selection range as well as the caret location (and hence takes two input rectangles).
Unset target milestone as the specified one is already passed.