This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdb/tui: Add command completion to winheight command.
- From: Andrew Burgess <andrew dot burgess at embecosm dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sun, 12 Jul 2015 22:34:49 +0100
- Subject: Re: [PATCH] gdb/tui: Add command completion to winheight command.
- Authentication-results: sourceware.org; auth=none
- References: <1436534024-23458-1-git-send-email-andrew dot burgess at embecosm dot com> <559FF19E dot 3010208 at redhat dot com> <20150712085140 dot GE5485 at embecosm dot com> <55A280B3 dot 9050503 at redhat dot com>
* 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