From patchwork Tue Jan 6 15:58:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Zaretskii X-Patchwork-Id: 4527 Received: (qmail 10598 invoked by alias); 6 Jan 2015 15:58:27 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 10510 invoked by uid 89); 6 Jan 2015 15:58:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout21.012.net.il Received: from mtaout21.012.net.il (HELO mtaout21.012.net.il) (80.179.55.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 06 Jan 2015 15:58:22 +0000 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NHR00400IZP6Z00@a-mtaout21.012.net.il> for gdb-patches@sourceware.org; Tue, 06 Jan 2015 17:58:20 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NHR004BBJ173540@a-mtaout21.012.net.il>; Tue, 06 Jan 2015 17:58:19 +0200 (IST) Date: Tue, 06 Jan 2015 17:58:28 +0200 From: Eli Zaretskii Subject: Re: [PATCHSET] [3/4] Fix various issue in TUI In-reply-to: <54AAE610.4050700@redhat.com> To: Pedro Alves Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <831tn799zv.fsf@gnu.org> References: <83wq57btea.fsf@gnu.org> <54AAE610.4050700@redhat.com> X-IsSubscribed: yes > Date: Mon, 05 Jan 2015 19:29:20 +0000 > From: Pedro Alves > > > @item tabset @var{nchars} > > @kindex tabset > > -Set the width of tab stops to be @var{nchars} characters. > > +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. > > @end table > > (this is yet another setting that would be nicer if the TUI reflected > updates immediately.) Like this? 2015-01-06 Eli Zaretskii * tui/tui-win.c (tui_set_tab_width_command): Delete and recreate the source and the disassembly windows, to show the effect of the changed tab size immediately. --- gdb/tui/tui-win.c~2 2015-01-04 08:07:30 +0200 +++ gdb/tui/tui-win.c 2015-01-06 08:03:05 +0200 @@ -1020,7 +1026,27 @@ tui_set_tab_width_command (char *arg, in ts = atoi (arg); if (ts > 0) - tui_set_default_tab_len (ts); + { + tui_set_default_tab_len (ts); + /* We don't really change the height of any windows, but + calling these 2 functions causes a complete regeneration + and redisplay of the window's contents, which will take + the new tab width into account. */ + if (tui_win_list[SRC_WIN] + && tui_win_list[SRC_WIN]->generic.is_visible) + { + make_invisible_and_set_new_height (TUI_SRC_WIN, + TUI_SRC_WIN->generic.height); + make_visible_with_new_height (TUI_SRC_WIN); + } + if (tui_win_list[DISASSEM_WIN] + && tui_win_list[DISASSEM_WIN]->generic.is_visible) + { + make_invisible_and_set_new_height (TUI_DISASM_WIN, + TUI_DISASM_WIN->generic.height); + make_visible_with_new_height (TUI_DISASM_WIN); + } + } else warning (_("Tab widths greater than 0 must be specified.")); }