less-pager does not update when window is resized
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(
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\
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[\
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
Changed in less: | |
status: | New → Confirmed |
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.