binutils-gdb/gdb/tui
Andrew Burgess 357c158f3a gdb/tui: fair split of delta after a resize
Currently, in master gdb, when a tui window is changed in size, the
screen delta is mostly just added to the next available window.  We
do take care to respect the min/max size, but in most cases, these
limits are just "the terminal size", and so, we end up placing the
whole delta on the next window.

Consider these steps in an 80 column, 24 line terminal:

  (gdb) tui enable
  (gdb) layout src
  (gdb) layout split
  (gdb) info win
  Name       Lines Columns Focus
  src            8      80 (has focus)
  asm            8      80
  status         1      80
  cmd            8      80
  (gdb) winheight cmd +2
  (gdb) info win
  Name       Lines Columns Focus
  src            6      80 (has focus)
  asm            8      80
  status         1      80
  cmd           10      80

Notice that initially, the windows were balanced, 8 lines each for the
major windows.  Then, when the cmd window was adjusted, the extra two
lines were given to the asm window.

I think it would be nicer if the delta was spread more evenly over the
available windows.  In the example above, after the adjustment the
layout now looks like:

  (gdb) info win
  Name       Lines Columns Focus
  src            7      80 (has focus)
  asm            7      80
  status         1      80
  cmd           10      80

This is achieved within tui_layout_split::set_size, by just handing
out the delta in increments of 1 to each window (except for the window
the user adjusted), until there's no more delta left.  Of course, we
continue to respect the min/max window sizes.
2022-04-03 15:31:47 +01:00
..
ChangeLog-1998-2003
tui-command.c gdb/tui: relax restrictions on window max height and width 2022-04-03 15:31:47 +01:00
tui-command.h gdb/tui: relax restrictions on window max height and width 2022-04-03 15:31:47 +01:00
tui-data.c
tui-data.h
tui-disasm.c gdb/build: Fix Wpessimizing-move in clang build 2022-01-28 23:02:36 +08:00
tui-disasm.h
tui-file.c
tui-file.h
tui-hooks.c
tui-hooks.h
tui-interp.c gdb/cli: add a 'normal_stop' option to 'cli_suppress_notification' 2022-02-07 08:26:56 +01:00
tui-io.c Change the pager to a ui_file 2022-03-29 12:46:24 -06:00
tui-io.h
tui-layout.c gdb/tui: fair split of delta after a resize 2022-04-03 15:31:47 +01:00
tui-layout.h gdb/tui: support placing the cmd window into a horizontal layout 2022-04-03 15:31:47 +01:00
tui-location.c
tui-location.h
tui-out.c
tui-out.h
tui-regs.c Unify gdb printf functions 2022-03-29 12:46:24 -06:00
tui-regs.h
tui-source.c gdb: remove SYMTAB_OBJFILE macro 2022-02-06 16:03:46 -05:00
tui-source.h
tui-stack.c gdb: add string_file::release method 2022-01-26 10:01:40 -05:00
tui-stack.h
tui-win.c gdb/tui: relax restrictions on window max height and width 2022-04-03 15:31:47 +01:00
tui-win.h
tui-wingeneral.c
tui-wingeneral.h
tui-winsource.c gdb: remove SYMTAB_OBJFILE macro 2022-02-06 16:03:46 -05:00
tui-winsource.h
tui.c gdb/tui: add a tui debugging flag 2022-04-03 15:31:46 +01:00
tui.h gdb/tui: add a tui debugging flag 2022-04-03 15:31:46 +01:00