aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-01-24 22:02:59 +0000
committerAndrew Burgess <aburgess@redhat.com>2022-04-03 15:15:09 +0100
commit160444ec7fd7c6df81826b8e06aa32a2ac1df856 (patch)
tree203f32b2a5e84359ef9756ce50e1b5f64553eb6d /gdb/doc
parentef466e0f0827555fcae21a905b3a2b9a6c0a5712 (diff)
downloadgdb-160444ec7fd7c6df81826b8e06aa32a2ac1df856.zip
gdb-160444ec7fd7c6df81826b8e06aa32a2ac1df856.tar.gz
gdb-160444ec7fd7c6df81826b8e06aa32a2ac1df856.tar.bz2
gdb/tui: add new 'tui window width' command and 'winwidth' alias
This commit adds a new command 'tui window width', and an alias 'winwidth'. This command is equivalent to the old 'winheight' command (which was recently renamed 'tui window height'). Even though I recently moved the old tui commands under the tui namespace, and I would strongly encourage all new tui commands to be added as 'tui ....' only (users can create their own top-level aliases if they want), I'm breaking that suggestion here, and adding a 'winwidth' alias. Given that we already have 'winheight' and have done for years, it just didn't seem right to no have the matching 'winwidth'. You might notice in the test that the window resizing doesn't quite work right. I setup a horizontal layout, then grow and shrink the windows. At the end of the test the windows should be back to their original size... ... they are not. This isn't my fault, honest! GDB's window resizing is a little ... temperamental, and is prone to getting things slightly wrong during resizes, off by 1 type things. This is true for height resizing, as well as the new width resizing. Later patches in this series will rework the resizing algorithm, which should improve things in this area. For now, I'm happy that the width resizing is as good as the height resizing, given the existing quirks. For the docs side I include a paragraph that explains how multiple windows are required before the width can be adjusted. For completeness, I've added the same paragraph to the winheight description. With the predefined layouts this extra paragraph is not really needed for winheight, as there are always multiple windows on the screen. However, with custom layouts, this might not be true, so adding the paragraph seems like a good idea. As for the changes in gdb itself, I've mostly just taken the existing height adjustment code, changed the name to make it generic 'size' adjustment, and added a boolean flag to indicate if we are adjusting the width or the height.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/gdb.texinfo22
1 files changed, 22 insertions, 0 deletions
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 4aec2e8..0e80ab8 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -29114,6 +29114,28 @@ Positive counts increase the height, while negative counts decrease
it. The @var{name} parameter can be the name of any currently visible
window. The names of the currently visible windows can be discovered
using @kbd{info win} (@pxref{info_win_command,,info win}).
+
+The set of currently visible windows must always fill the terminal,
+and so, it is only possible to resize on window if there are other
+visible windows that can either give or receive the extra terminal
+space.
+
+@kindex tui window width
+@kindex winwidth
+@item tui window width @var{name} +@var{count}
+@itemx tui window width @var{name} -@var{count}
+@itemx winwidth @var{name} +@var{count}
+@itemx winwidth @var{name} -@var{count}
+Change the width of the window @var{name} by @var{count} columns.
+Positive counts increase the width, while negative counts decrease it.
+The @var{name} parameter can be the name of any currently visible
+window. The names of the currently visible windows can be discovered
+using @code{info win} (@pxref{info_win_command,,info win}).
+
+The set of currently visible windows must always fill the terminal,
+and so, it is only possible to resize on window if there are other
+visible windows that can either give or receive the extra terminal
+space.
@end table
@node TUI Configuration