[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gv] Fwd: Bug#594991: unexpected scrolling of the TOC widget

From: Bernhard R. Link
Subject: [bug-gv] Fwd: Bug#594991: unexpected scrolling of the TOC widget
Date: Tue, 31 Aug 2010 19:09:31 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

----- Forwarded message from Christoph Nodes <address@hidden> -----
From: Christoph Nodes <address@hidden>
Date: Tue, 31 Aug 2010 09:06:01 +0000
Subject: Bug#594991: unexpected scrolling of the TOC widget

Package: gv
Version: 1:3.7.1-1bfw2
Severity: normal
Tags: patch

The TOC widget scrolls downwards when selecting its last visible entry. This
makes sense for long lists that do not fit into the widget so you can keep
track of where you are while browsing throuh the document. However, the widget
also scrolls downwards if you select the very last entry which is not necessary
as there are no more entries to come. In particular, this is unexpected and
very annoying for short lists where all entries can be perfectly seen as it
hides the first entry.

The attached patch fixes this behavior by preventing the widget to scroll
downwards if it is the very last entry that gets selected. As a result, the
downward and upward scrolling behavior gets consistent when reaching the very
last or first entry.


diff -u -r gv-3.7.1/src/misc.c gv-3.7.1-patched/src/misc.c
--- gv-3.7.1/src/misc.c 2010-06-03 18:36:25.000000000 +0200
+++ gv-3.7.1-patched/src/misc.c 2010-08-27 14:18:31.692487366 +0200
@@ -323,7 +323,7 @@
        VlistSetFirstVisible(newtoc, entry);
       b = True;
-    } else {
+    } else if (entry < VlistEntries(newtoc) - 1) {
       /* sadly newtoc does not know it's height, so it cannot be told
        * to made an item visible and we need to trick: */
       lastvisible = VlistEntryOfPosition(newtoc, newtocClip->core.height);

----- End forwarded message -----

reply via email to

[Prev in Thread] Current Thread [Next in Thread]