binutils-gdb/gdb/tui
Hannes Domani 427cc3b541 Fix using Page-Up in TUI source window close to the top
Currently, when you're already less than a page from the top in the TUI
source window, and you press Page-Up, nothing happens, while I would
expect that it then scrolls the source up to the first line.

It's happening because scrolling a full page up would result in a
negative starting line number, which is then checked if it's higher than
the (unsigned) number of available lines, and since this will always be
true, the original starting line number is restored.
Afterwards it would check if the line number is too low, but since the
negative value was already gone, it didn't do much.

Fixed by moving the low line number check before the maximum line number
check.

Approved-By: Tom Tromey <tom@tromey.com>
2024-11-11 17:13:45 +01:00
..
ChangeLog-1998-2003
tui-command.c
tui-command.h
tui-data.c
tui-data.h
tui-disasm.c
tui-disasm.h
tui-file.c
tui-file.h
tui-hooks.c
tui-hooks.h
tui-interp.c
tui-io.c
tui-io.h
tui-layout.c
tui-layout.h
tui-location.c
tui-location.h
tui-regs.c
tui-regs.h
tui-source.c
tui-source.h
tui-status.c
tui-status.h
tui-win.c
tui-win.h
tui-wingeneral.c
tui-wingeneral.h
tui-winsource.c
tui-winsource.h
tui.c
tui.h