After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 78669 - with hidden cursor, keynav shouldn't be cursor-based
with hidden cursor, keynav shouldn't be cursor-based
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
2.0.x
Other other
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2002-04-14 16:09 UTC by Ron Koerner
Modified: 2011-02-04 16:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.15 KB, patch)
2003-01-24 00:27 UTC, Matthias Clasen
none Details | Review
patch (9.39 KB, patch)
2003-01-27 00:16 UTC, Matthias Clasen
none Details | Review
new patch (6.08 KB, patch)
2003-04-19 00:53 UTC, Matthias Clasen
none Details | Review

Description Ron Koerner 2002-04-14 16:09:18 UTC
If the cursor is hidden in a GtkTextView and you try to scroll up or down,
you first have to move the _invisible_ cursor to the top or bottom line
before the text actually moves.

Most users (at least me) might not understand the importance of the concept
of an invisible cursor. Is this known or already fixed?
Comment 1 Havoc Pennington 2002-04-14 16:55:52 UTC
It is known, but I'm not sure we had an open bug, and I don't think
it's fixed yet.
Comment 2 Matthias Clasen 2002-05-03 07:04:56 UTC
Found this one sitting on a past milestone.
Comment 3 Owen Taylor 2002-06-14 15:30:58 UTC
Move GtkTextView 2.0.4 bugs to 2.0.5
Comment 4 Matthias Clasen 2002-11-21 19:00:40 UTC
Moving bugs from older 2.0.x milestones to 2.0.10.
Comment 5 Matthias Clasen 2003-01-24 00:26:26 UTC
Here is an attempt to implement this. Maybe it would be cleaner to
have two separate sets of bindings, one for cursor-based navigation
and one for viewport-based navigation ...
Comment 6 Matthias Clasen 2003-01-24 00:27:26 UTC
Created attachment 13788 [details] [review]
patch
Comment 7 Havoc Pennington 2003-01-24 00:34:47 UTC
GTK_MOVEMENT_PAGES is already viewport-based, right? though 
I suppose that's a bit strange since the signal is called 
move_cursor.

This patch seems good for 2.2, but for 2.4 maybe a slightly different
patch that mops up PAGE_HORIZONTALLY_HACK_VALUE, and adds 
GTK_MOVEMENT_SCROLL_STEP (or something - need better name), 
so you can bind it even for editable widgets. Then 
at the top of move_cursor_internal could just do 
"if (!cursor_visible) { step = GTK_MOVEMENT_SCROLL_STEP }"
to replace the cursor-based step with the viewport one.

Two binding sets does seem like overkill to me.
Comment 8 Matthias Clasen 2003-01-24 00:52:33 UTC
Yes, GTK_MOVEMENT_PAGES is already viewport-based. 
I guess we need 4 viewport-based movement steps:

move vertically by pages   (GTK_MOVEMENT_PAGES)
move horizontally by pages (PAGE_HORIZONTALLY_HACK_VALUE)
move vertically by steps   (currently missing,
GTK_MOVEMENT_SCROLL_VERTICALLY ?)
move horizontally by steps   (currently missing,
GTK_MOVEMENT_SCROLL_HORIZONTALLY ?)

Committed to stable. 
Comment 9 Matthias Clasen 2003-01-27 00:15:57 UTC
Here is a patch which adds a separate enum, GtkScrollStep, and a
move_viewport keybinding signal.
Comment 10 Matthias Clasen 2003-01-27 00:16:33 UTC
Created attachment 13842 [details] [review]
patch
Comment 11 Havoc Pennington 2003-01-27 05:46:06 UTC
Does it make sense to do this *and* add GTK_MOVEMENT_HORIZONTAL_PAGES?
Comment 12 Matthias Clasen 2003-01-27 07:22:37 UTC
I think it is cleaner to separate the cursor movement from the viewport movement, so 
yes I think it makes sense to do both.
Comment 13 Owen Taylor 2003-03-28 22:54:19 UTC
So, the idea of this patch is to enable people to have
the ability to hook up scroll-viewport bindings, but
not to actually add any by default?

I'm not particularly opposed to that, though it strikes
me as something we wouldn't normally do.

Need to add the signal as a binding signal ... current patch
breaks bincompat.

Shouldn't LINE_ENDS do HORIZONTAL_ENDS? - that is, I'd
expect Home to scroll fully to the left and End fully
to the right.
Comment 14 Matthias Clasen 2003-04-19 00:53:52 UTC
Created attachment 15847 [details] [review]
new patch
Comment 15 Matthias Clasen 2003-04-19 00:54:46 UTC
Redone as binding signal, also mapping LINE_ENDS to HORIZONTAL_ENDS now.
Comment 16 Owen Taylor 2003-07-18 14:31:09 UTC
Looks good to me.