public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCHSET] [3/4] Fix various issue in TUI
@ 2014-12-31 17:50 Eli Zaretskii
  2015-01-05 19:29 ` Pedro Alves
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2014-12-31 17:50 UTC (permalink / raw)
  To: gdb-patches

This patch fixes a couple of problems with documentation of TUI
features.

OK?

2014-12-31  Eli Zaretskii  <eliz@gnu.org>

	* gdb/tui/tui-win.c (tui_scroll_left_command, tui_scroll_right_command):
	Doc fix.

	* gdb/doc/gdb.texinfo (TUI Commands): Document the possible
	values of NAME argument to 'winheight' command.  Explain the
	effect of 'tabset' setting better.


--- gdb/tui/tui-win.c~0	2014-10-29 21:45:50 +0200
+++ gdb/tui/tui-win.c	2014-12-31 13:55:32 +0200
@@ -403,10 +403,10 @@
 Scroll window backward.\n\
 Usage: - [win] [n]\n"));
   add_com ("<", class_tui, tui_scroll_left_command, _("\
-Scroll window forward.\n\
+Scroll window text to the left.\n\
 Usage: < [win] [n]\n"));
   add_com (">", class_tui, tui_scroll_right_command, _("\
-Scroll window backward.\n\
+Scroll window text to the right.\n\
 Usage: > [win] [n]\n"));
   if (xdb_commands)
     add_com ("w", class_xdb, tui_xdb_set_win_height_command, _("\


--- gdb/doc/gdb.texinfo~0	2014-10-29 21:45:50 +0200
+++ gdb/doc/gdb.texinfo	2014-12-31 16:01:29 +0200
@@ -24384,11 +24384,15 @@
 @kindex winheight
 Change the height of the window @var{name} by @var{count}
 lines.  Positive counts increase the height, while negative counts
-decrease it.
+decrease it.  The @var{name} parameter can be one of @code{src} (the
+source window), @code{cmd} (the command window), @code{asm} (the
+disassembly window), or @code{regs} (the register display window).
 
 @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
 
 @node TUI Configuration

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCHSET] [3/4] Fix various issue in TUI
  2014-12-31 17:50 [PATCHSET] [3/4] Fix various issue in TUI Eli Zaretskii
@ 2015-01-05 19:29 ` Pedro Alves
  2015-01-06 15:58   ` Eli Zaretskii
  2015-01-16 11:35   ` Eli Zaretskii
  0 siblings, 2 replies; 6+ messages in thread
From: Pedro Alves @ 2015-01-05 19:29 UTC (permalink / raw)
  To: Eli Zaretskii, gdb-patches

On 12/31/2014 05:50 PM, Eli Zaretskii wrote:
> This patch fixes a couple of problems with documentation of TUI
> features.
> 
> OK?

Looks fine to me.

> 
> 2014-12-31  Eli Zaretskii  <eliz@gnu.org>
> 
> 	* gdb/tui/tui-win.c (tui_scroll_left_command, tui_scroll_right_command):
> 	Doc fix.
> 


> 	* gdb/doc/gdb.texinfo (TUI Commands): Document the possible
> 	values of NAME argument to 'winheight' command.  Explain the
> 	effect of 'tabset' setting better.

Recall that gdb/doc/ has its own ChangeLog.

>  @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.)

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCHSET] [3/4] Fix various issue in TUI
  2015-01-05 19:29 ` Pedro Alves
@ 2015-01-06 15:58   ` Eli Zaretskii
  2015-01-06 16:20     ` Pedro Alves
  2015-01-16 11:35   ` Eli Zaretskii
  1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2015-01-06 15:58 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches

> Date: Mon, 05 Jan 2015 19:29:20 +0000
> From: Pedro Alves <palves@redhat.com>
> 
> >  @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  <eliz@gnu.org>

	* 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."));
     }

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCHSET] [3/4] Fix various issue in TUI
  2015-01-06 15:58   ` Eli Zaretskii
@ 2015-01-06 16:20     ` Pedro Alves
  2015-01-16 15:55       ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Pedro Alves @ 2015-01-06 16:20 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb-patches

On 01/06/2015 03:58 PM, Eli Zaretskii wrote:
>> Date: Mon, 05 Jan 2015 19:29:20 +0000
>> From: Pedro Alves <palves@redhat.com>
>>
>>>  @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?

Yep, looks good.  Thanks!

> 
> 2015-01-06  Eli Zaretskii  <eliz@gnu.org>
> 
> 	* 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.

Pedro Alves

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCHSET] [3/4] Fix various issue in TUI
  2015-01-05 19:29 ` Pedro Alves
  2015-01-06 15:58   ` Eli Zaretskii
@ 2015-01-16 11:35   ` Eli Zaretskii
  1 sibling, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2015-01-16 11:35 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches

> Date: Mon, 05 Jan 2015 19:29:20 +0000
> From: Pedro Alves <palves@redhat.com>
> 
> On 12/31/2014 05:50 PM, Eli Zaretskii wrote:
> > This patch fixes a couple of problems with documentation of TUI
> > features.
> > 
> > OK?
> 
> Looks fine to me.

Thanks, pushed.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCHSET] [3/4] Fix various issue in TUI
  2015-01-06 16:20     ` Pedro Alves
@ 2015-01-16 15:55       ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2015-01-16 15:55 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches

> Date: Tue, 06 Jan 2015 16:20:23 +0000
> From: Pedro Alves <palves@redhat.com>
> CC: gdb-patches@sourceware.org
> 
> On 01/06/2015 03:58 PM, Eli Zaretskii wrote:
> >> Date: Mon, 05 Jan 2015 19:29:20 +0000
> >> From: Pedro Alves <palves@redhat.com>
> >>
> >>>  @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?
> 
> Yep, looks good.  Thanks!

Thanks, pushed.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-01-16 15:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-31 17:50 [PATCHSET] [3/4] Fix various issue in TUI Eli Zaretskii
2015-01-05 19:29 ` Pedro Alves
2015-01-06 15:58   ` Eli Zaretskii
2015-01-06 16:20     ` Pedro Alves
2015-01-16 15:55       ` Eli Zaretskii
2015-01-16 11:35   ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).