]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/tui] Show focus window in status line
authorTom de Vries <tdevries@suse.de>
Fri, 8 Dec 2023 22:02:31 +0000 (23:02 +0100)
committerTom de Vries <tdevries@suse.de>
Fri, 8 Dec 2023 22:02:31 +0000 (23:02 +0100)
commit612f120d41e81056bf29db07f494f0cdf27b545d
tree6a496c0984771ca9894d4e527ea601404f54b6ea
parent576745e26c0ec76a53ba45b20af464628a50b3e4
[gdb/tui] Show focus window in status line

The focused window is highlighted by using active-border-kind instead of
border-kind.

But if the focused window is the cmd window (which is an unboxed window), then
no highlighting is done, and it's not obvious from looking at the screen which
window has the focus.  Instead, you have to notice the absence of highlighting
on boxed windows, and then infer that the focus is on the unboxed window.

That approach stops working if there are multiple unboxed windows.

Likewise if highlighting is switched off by setting active-border-kind to the
same value as border-kind.

Make it more explicit which window has the focus by mentioning it in the status
window, like so:
...
native process 8282 (src) In: main                      L7    PC: 0x400525
...

Tested on x86_64-linux and ppc64le-linux.

Tested-By: Alexandra Petlanova Hajkova <ahajkova@redhat.com>
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Approved-By: Tom Tromey <tom@tromey.com>
gdb/doc/gdb.texinfo
gdb/testsuite/gdb.tui/single-key.exp
gdb/tui/tui-data.c
gdb/tui/tui-stack.c