GDB TUI: Limit legend to one line (#3056)

Large resolutions could cause the space allocated for the legend row to be too big causing it to show up with empty lines below.

Reduce the weight to 0 to make it as small as possible every time.

Fixes #3044
pull/3060/head
peace-maker 6 months ago committed by GitHub
parent 1712b597a3
commit 4b03efdd93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -8,6 +8,6 @@ Use `focus cmd` to focus the command window and have the arrow keys scroll throu
To create [your own layout](https://sourceware.org/gdb/current/onlinedocs/gdb.html/TUI-Commands.html) and selecting it use normal `tui new-layout` syntax like:
```
tui new-layout pwndbg_custom {-horizontal { { -horizontal { pwndbg_code 1 pwndbg_disasm 1 } 2 { {-horizontal pwndbg_legend 8 pwndbg_control 2 } 1 pwndbg_regs 6 pwndbg_stack 6 } 3 } 7 cmd 3 } 3 { pwndbg_backtrace 2 pwndbg_threads 1 pwndbg_expressions 2 } 1 } 1 status 1
tui new-layout pwndbg_custom {-horizontal { { -horizontal { pwndbg_code 1 pwndbg_disasm 1 } 2 { {-horizontal pwndbg_legend 8 pwndbg_control 2 } 0 pwndbg_regs 1 pwndbg_stack 1 } 3 } 7 cmd 3 } 3 { pwndbg_backtrace 2 pwndbg_threads 1 pwndbg_expressions 2 } 1 } 1 status 1
layout pwndbg_custom
```

@ -15,7 +15,7 @@ def setup() -> None:
" { -horizontal "
" { pwndbg_disasm 1 } 2 "
" { "
" { -horizontal pwndbg_legend 8 pwndbg_control 2 } 1 pwndbg_regs 6 pwndbg_stack 6 "
" { -horizontal pwndbg_legend 8 pwndbg_control 2 } 0 pwndbg_regs 1 pwndbg_stack 1 "
" } 3 "
" } 7 cmd 3 "
" } 3 { pwndbg_backtrace 2 pwndbg_threads 1 pwndbg_expressions 2 } 1 "
@ -28,7 +28,7 @@ def setup() -> None:
" { -horizontal "
" { pwndbg_code 1 pwndbg_disasm 1 } 2 "
" { "
" { -horizontal pwndbg_legend 8 pwndbg_control 2 } 1 pwndbg_regs 6 pwndbg_stack 6 "
" { -horizontal pwndbg_legend 8 pwndbg_control 2 } 0 pwndbg_regs 1 pwndbg_stack 1 "
" } 3 "
" } 7 cmd 3 "
" } 3 { pwndbg_backtrace 2 pwndbg_threads 1 pwndbg_expressions 2 } 1 "

Loading…
Cancel
Save