From: Tom Tromey <tromey@cygnus.com>
To: Insight List <insight@sourceware.cygnus.com>
Subject: completion fix
Date: Thu, 13 Apr 2000 18:14:00 -0000 [thread overview]
Message-ID: <87og7dh49u.fsf@cygnus.com> (raw)
I'm debugging gcj. I bring up the console and type:
b build_jni<Tab>
There is only one function that this can possibly complete. Insight
changes it to "b build_jni_stub" and beeps.
This annoyed me, so I looked at the code. I added some debugging
prints and it turns out that the switch statement was written
incorrectly. Also, the `1' branch had an obvious bug. (Code like
`switch {' is almost always wrong. I didn't grep through the source
to see if this error is in more than one place.)
Here is a patch.
(BTW I gave myself write permission for the `src' repo on sourceware,
because I had some dejagnu patches to check in. So if you want I can
commit this myself. If you'd rather not, that is also fine -- it
doesn't matter to me.)
2000-04-13 Tom Tromey <tromey@cygnus.com>
* console.itb (Console::_complete): Dequoted first argument to
switch. Window name is `$_twin', not `_twin'.
Tom
Index: library/console.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/console.itb,v
retrieving revision 1.2
diff -u -r1.2 console.itb
--- console.itb 2000/04/10 16:49:30 1.2
+++ console.itb 2000/04/14 01:11:50
@@ -566,10 +566,10 @@
# is one match, complete the command and print a space.
# If two or more matches, complete the command and beep.
# If no match, just beep.
- switch {[llength $choices]} {
+ switch [llength $choices] {
0 {}
1 {
- _twin insert end "$completion "
+ $_twin insert end "$completion "
set _saw_tab 0
return
}
next reply other threads:[~2000-04-13 18:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-04-13 18:14 Tom Tromey [this message]
2000-04-13 18:21 ` James Ingham
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87og7dh49u.fsf@cygnus.com \
--to=tromey@cygnus.com \
--cc=insight@sourceware.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).