This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] gdb/tui: Add command completion to winheight command.


* Pedro Alves <palves@redhat.com> [2015-07-12 15:58:59 +0100]:

> On 07/12/2015 09:51 AM, Andrew Burgess wrote:
> 
> > gdb/ChangeLog:
> > 
> > 	* tui/tui-win.c (window_name_completer): New function.
> > 	(focus_completer): Call window_name_completer.  All old content
> > 	moved into window_name_completer.
> > 	(winheight_completer): New function.
> > 	(_initialize_tui_win): Rename variable.  Add completer to
> > 	winheight command.  Update doc string on winheight.
> > 
> 
> This is OK.
> 
> > -/* Complete possible window names to focus on.  TEXT is the complete text
> > -   entered so far, WORD is the word currently being completed.  */
> > +/* Generic window name completion function.  Complete window name pointed
> > +   to by TEXT and WORD.  If INCLUDE_NEXT_PREV_P is true then the special
> > +   window names 'next' and 'prev' are also included in the list of possible
> > +   completions (if appropriate).  */
> >  
> 
> I don't really understand what "if appropriate" is referring to, though.

I originally wrote "... are also included in the list of possible
completions." however, this is not true, if a window name has been
partially typed then clearly 'prev' or 'next' might not be included in
the list of possible completions (if say the partial window name
started with a 'c').

How about this wording:

"If INCLUDE_NEXT_PREV_P is true then the special window names 'next'
 and 'prev' will also be considered as possible completions of the
 window name."

Or feel free to suggest something simpler.

Thanks,
Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]