• Egmont Koblinger's avatar
    [PATCH] Shift+PgUp if nr of scrolled lines is < 4 · 17220af0
    Egmont Koblinger authored
    Using the vga console driver, if the number of the lines scrolled out is
    less than four, then Shift+PageUp doesn't work.
    
    The bug is closely related to the 'margin' feature of scrolling, which
    means that if less than four lines should remain unvisible in the direction
    we are scrolling to, then we scroll a little bit more just to see those few
    lines.  Kind of two small magnets at the borders of the buffer.
    
    This bug was also reported with maybe a less clear description by Stepan
    Koltsov (cc'ed just for fun) back in 2001 and he got no answer.  I found it
    at http://seclists.org/lists/linux-kernel/2001/Nov/0080.html
    
    His patch simply disables margin support and hence everythings becomes
    okay, but you lose a nice feature.
    
    Here's a patch that retains margin support and fixes the bug.  Works for
    me, tested for a week.  No guarantee.  As I don't fully understand the code
    (see also my previous mail) I'm not 100% sure that I'm doing the right
    thing, so I'd prefer if someone would take a closer look at it.
    
    At least 2.4 and 2.6 are affected, maybe older ones too.
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    17220af0
vgacon.c 31.6 KB