GNOME Bugzilla – Bug 115149
PageUp in 'less' has gone a bit haywire
Last modified: 2004-12-22 21:47:04 UTC
Debian Bug#190651 (summary below includes patch) Having trouble with 'gnome-terminal' for the last few weeks. I start 'gnome-terminal', then run 'less' on some text file. Press 'PageDown' a few times. All is well. Things get funny when I press 'PageUp'. It's hard to describe, so here are some pictures of a sample of text, and several virtual 5 line "screen shots". (25 lines would be too much to "draw"!) Suppose I'm looking at 8 lines of text: 1 in their entirety; 2 (c) the copies give obvious credit to the author, Hank Leukart; 3 (d) the copies are in electronic form. 4 II. To distribute this work, or copies made under the provisions 5 above, so long as 6 (a) this is the original work and not a derivative form; 7 (b) you do not charge a fee for copying or for distribution; 8 (c) you ensure that the distributed form includes the copyright And the 5 line screen with 'less' (running under 'gnome-terminal') looks like this: ******** above, so long as (a) this is the original work and not a derivative form; (b) you do not charge a fee for copying or for distribution; (c) you ensure that the distributed form includes the copyright : ******** (The "********" represents the monitor edge.) If I press PageUp, I'd see: ******** above, so long as above, so long as (a) this is the original work and not a derivative form; (b) you do not charge a fee for copying or for distribution; (c) you ensure that the distributed form includes the copyright ******** ...then: ******** above, so long as above, so long as above, so long as (a) this is the original work and not a derivative form; (b) you do not charge a fee for copying or for distribution; ******** ...then: ******** above, so long as above, so long as above, so long as above, so long as (a) this is the original work and not a derivative form; ******** ...then: ******** above, so long as above, so long as above, so long as above, so long as above, so long as ******** ...then: ******** in their entirety; (c) the copies give obvious credit to the author, Hank Leukart; (d) the copies are in electronic form. II. To distribute this work, or copies made under the provisions : ******** ...and then it stops. The last "screen" above is what 'less' should show. The bigger the terminal, the longer it takes to display. PageUp is now slow. Notes: PageUp works fine in programs like 'mc' or 'pinfo'. Gnome-terminal's shift-PageUp back-scroll works fine too. I don't think it's a 'less' problem. Under other shells (the console, or 'rxvt') 'less' behaves correctly. > I can't find for you in wich package that bug is. For me this bug is > unrteproducible. Are you saying you can't reproduce this bug on your system at present? Or that you never were able to reproduce it? Whatever the case, I've found the trouble. Read on... Earlier you mentioned that 'libvte4 0.10.28-1' fixed this. Now the last entry in the upstream changelog.gz. is: 2003-05-06 nalin * src/vte.c(vte_terminal_scroll_region): compare the top line to be scrolled to the scrolling delta instead of 0 (in HEAD, got lost somewhere). ...which sounds a lot like this bug. Also some time after May 6th corresponds to when I noticed the scrolling worked right. Whereas there's a later and earlier entry in the changelog.Debian.gz: vte (1:0.10.28-1) unstable; urgency=low * New upstream release. -- Christian Marillat <marillat@debian.org> Tue, 13 May 2003 09:07:26 +0200 vte (1:0.10.27-1) unstable; urgency=low * New upstream release. * Fix fonts size (Closes: #186705) -- Christian Marillat <marillat@debian.org> Mon, 5 May 2003 13:13:52 +0200 May 5 is before May 6, but the upstream date could be a typo, or even a tardy annotation. To test that, I ought to downgrade one version, and see how it works... (time passes) Found older versions at: ftp://ftp.cerias.purdue.edu/pub/os/debian/pool/main/v/vte/ ftpusers 68946 May 5 06:32 libvte-common_0.10.27-1_all.deb ftpusers 725536 May 5 06:32 libvte4_0.10.27-1_i386.deb Note the dates. May 5. I installed (downgraded) both. And after restarting 'gnome-terminal' the scrolling in 'less' works OK. So it seems that 1:0.10.27-1 fixed #190651, and 1:0.10.28-1 brought it back. Reopen Bug #190651 s'il vous plait? I've had problems with this bug too, it started after catching back up with unstable again. The two versions of libvte4 I've tried, 0.10.28 and 0.10.29 both exhibit this bug. I looked through the revision history of this bug, then scanned all the mirrors to find a 0.10.27 release -- found one and downgraded libvte4 and libvte4-common to it, and that fixed the gnome-terminal problem. So, having nothing better to do on a Friday evening, I hunted through the diff of changes from 0.10.27 to 0.10.29 and tried reversing some of them to see what was causing this weirdness. The good news is I found a one-line change that fixes the problem. diff -urN vte-0.10.29.orig/src/vte.c vte-0.10.29/src/vte.c --- vte-0.10.29.orig/src/vte.c 2003-05-30 20:43:17.000000000 +0100 +++ vte-0.10.29/src/vte.c 2003-06-13 21:16:20.000000000 +0100 @@ -769,7 +769,7 @@ /* We only do this if we're scrolling the entire window. */ if (!terminal->pvt->bg_transparent && (terminal->pvt->bg_image == NULL) && - (row == terminal->pvt->screen->scroll_delta) && + (row == 0) && (count == terminal->row_count)) { widget = GTK_WIDGET(terminal); gdk_window_scroll(widget->window, This reverses the change that Alfie guessed might be relevant (the following is the upstream changelog entry): 2003-05-06 nalin * src/vte.c(vte_terminal_scroll_region): compare the top line to be scrolled to the scrolling delta instead of 0 (in HEAD, got lost somewhere).
*tap*tap*tap* Uh, is this thing on? Hello? Hello? Mary had a little lamb... Is anyone there? CQ? CQ? This is W9GHXO here, come back?
This is normal with VTE folks!! your find fixes my problem, on linux as well as solaris.
Bugs don't go away if you ignore them guys :o)
*** Bug 124328 has been marked as a duplicate of this bug. ***
The one line fix given above works with cvs on Red Hat 9. The patch may be committed.
The patch attached to the 1st comment does not really fix the problem, only its manifestation: the following patch has exactly the same behaviour... Clearly, the problem is elsewhere. diff -urN vte-0.10.29.orig/src/vte.c vte-0.10.29/src/vte.c --- vte-0.10.29.orig/src/vte.c 2003-05-30 20:43:17.000000000 +0100 +++ vte-0.10.29/src/vte.c 2003-06-13 21:16:20.000000000 +0100 @@ -769,7 +769,7 @@ /* We only do this if we're scrolling the entire window. */ if (!terminal->pvt->bg_transparent && (terminal->pvt->bg_image == NULL) && - (row == terminal->pvt->screen->scroll_delta) && + (FALSE) && (count == terminal->row_count)) { widget = GTK_WIDGET(terminal); gdk_window_scroll(widget->window,
Still seeing this with VTE 0.11.10, sadly.
Hmmm, this bug seems to be a duplicate from #120401 which have a different patch (from Owen)
*** This bug has been marked as a duplicate of 120401 ***