----- Forwarded message from Christoph Nodes <bug-deb...@bfw-online.de> ----- From: Christoph Nodes <bug-deb...@bfw-online.de> 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 @@ else 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 -----