Bug 106065 - moving the caret with the arrow keys doesn't move the viewport accordingly
Summary: moving the caret with the arrow keys doesn't move the viewport accordingly
Status: NEW
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy GEF (MVC) (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Anthony Hunter CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-04 12:13 EDT by Takahiro Kato CLA
Modified: 2016-12-14 11:17 EST (History)
1 user (show)

See Also:


Attachments
patch for GraphicalTextViewer (5.17 KB, patch)
2005-08-04 12:23 EDT, Takahiro Kato CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Takahiro Kato CLA 2005-08-04 12:13:14 EDT
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.
Comment 1 Takahiro Kato CLA 2005-08-04 12:23:11 EDT
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.
Comment 2 Pratik Shah CLA 2005-12-20 18:30:29 EST
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).
Comment 3 Alexander Nyßen CLA 2013-10-17 09:44:41 EDT
Unset target milestone as the specified one is already passed.