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