diff options
author | Tom Tromey <tom@tromey.com> | 2019-07-11 17:06:00 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-12-01 11:59:23 -0700 |
commit | d1da6b01608841c846aa75209248e276f49e1587 (patch) | |
tree | e3a2f0b33cacf71c077a015f2647690086e70ef9 /gdb/doc | |
parent | 489dbda6a8d6d54bbc349c7048553fc5f791cb41 (diff) | |
download | gdb-d1da6b01608841c846aa75209248e276f49e1587.zip gdb-d1da6b01608841c846aa75209248e276f49e1587.tar.gz gdb-d1da6b01608841c846aa75209248e276f49e1587.tar.bz2 |
Allow using less horizontal space in TUI source window
The source window currently uses a field width of 6 for line numbers,
and it further aligns to the next tab stop. This seemed a bit
wasteful of horizontal space to me, so I changed that in an earlier
patch.
However, that change wasn't universally popular. This patch instead
adds the option to use less horizontal space in the TUI source window.
gdb/ChangeLog
2019-12-01 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.h (tui_copy_source_line): Add "ndigits"
parameter.
* tui/tui-winsource.c (tui_copy_source_line): Add "ndigits"
parameter.
* tui/tui-win.h (compact_source): Declare.
* tui/tui-win.c (compact_source): New global.
(tui_set_compact_source, tui_show_compact_source): New functions.
(_initialize_tui_win): Add "compact-source" setting.
* tui/tui-source.c (tui_source_window::set_contents): Handle
compact_source setting.
* tui/tui-disasm.c (tui_disasm_window::set_contents): Update.
* NEWS: Document new setting.
gdb/doc/ChangeLog
2019-12-01 Tom Tromey <tom@tromey.com>
* gdb.texinfo (TUI Configuration): Document new setting.
Change-Id: I46ce9a68b12c9c79332d510f9c14b3c84b7efadd
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index aaac75a..8028f78 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,7 @@ +2019-12-01 Tom Tromey <tom@tromey.com> + + * gdb.texinfo (TUI Configuration): Document new setting. + 2019-11-30 Philippe Waroquiers <philippe.waroquiers@skynet.be> * gdb.texinfo (Define): Indicate that user-defined prefix can diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 2c30ea6..9b5297e 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -28017,6 +28017,14 @@ Use extra bright or bold and standout mode. Set the width of tab stops to be @var{nchars} characters. This setting affects the display of TAB characters in the source and assembly windows. + +@item set tui compact-source @r{[}on@r{|}off@r{]} +@kindex set tui compact-source +Set whether the TUI source window is displayed in ``compact'' form. +The default display uses more space for line numbers and starts the +source text at the next tab stop; the compact display uses only as +much space as is needed for the line numbers in the current file, and +only a single space to separate the line numbers from the source. @end table @node Emacs |