less-pager does not update when window is resized

Bug #137244 reported by Klaus S. Madsen
8
Affects Status Importance Assigned to Milestone
less (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: less

In gutsy (updated as of today, less version 406-0): Open a shell (I use RXVT), start less with a large file. Then resize the window. Note that less doesn't update until a key is pressed in the window. I feisty less updates as soon as the resize is completed.

strace of a less window being resized:

Process 13775 attached - interrupt to quit
read(3, 0xbfb79baf, 1) = ? ERESTARTSYS (To be restarted)
--- SIGWINCH (Window changed) @ 0 (0) ---
rt_sigaction(SIGWINCH, {0x805b310, [WINCH], SA_RESTART}, {0x805b310, [WINCH], SA_RESTART}, 8) = 0
sigreturn() = ? (mask now [])
read(3,

Once a key is pressed, the following is appended to the trace:

read(3, "\33", 1) = 1
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
ioctl(1, TIOCGWINSZ, {ws_row=35, ws_col=117, ws_xpixel=0, ws_ypixel=0}) = 0
ioctl(2, TIOCGWINSZ, {ws_row=35, ws_col=117, ws_xpixel=0, ws_ypixel=0}) = 0
write(1, "\33[H\33[2J\33[H<!DOCTYPE HTML PUBLIC "..., 1023) = 1023
write(1, " New Roman\", serif; font-size: 1"..., 1023) = 1023
time(NULL) = 1188901115
write(1, ": 14pt; so-language: zxx }\n "..., 544) = 544
read(3, "[", 1) = 1
write(1, "\r\33[KBrackets: \33[K[\10[\33[K]\10]\r\33[K", 30) = 30
write(1, "\r\33[K\33[7mNo bracket in top line "..., 51) = 51
read(3, "A", 1) = 1
write(1, "\33[35;1H", 7) = 7
write(1, "\7\r\33[K:\33[K", 9) = 9

Revision history for this message
Klaus S. Madsen (ubuntu-hjernemadsen) wrote :

The attached patch solves the problem for me. I haven't used it for long, so I'm not certain that there are no ill effects.

Revision history for this message
Klaus S. Madsen (ubuntu-hjernemadsen) wrote :

I've now been using my patched version of less for almost a month, and so far I haven't found any side-effects. Could this please get merged?

Changed in less:
status: New → Confirmed
Revision history for this message
Pádraig Brady (p-draigbrady) wrote :

same problem on fedora 8

Revision history for this message
Shaw Terwilliger (sterwill) wrote :

I first noticed this when I upgraded to Ubuntu 7.10. Annoying bug.

Revision history for this message
Albert Damen (albrt) wrote :

This bug has been fixed in Hardy (version 418-1).
From the upstream changelog:

Major changes between "less" versions 406 and 409
* Fix bug which caused screen to fail to repaint when window is resized.

Changed in less:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.