This is the mail archive of the
insight@sourceware.cygnus.com
mailing list for the Insight project.
M-b
- To: Insight List <insight at sourceware dot cygnus dot com>
- Subject: M-b
- From: Tom Tromey <tromey at cygnus dot com>
- Date: 22 May 2000 14:20:01 -0600
- Reply-To: tromey at cygnus dot com
Bring up the Console. Hit Meta-b.
Note that the cursor appears in the prompt. Oops.
I looked at this a bit. It seems like the appended patch should fix
the problem, but it doesn't.
Experimentation at runtime shows that the Text binding is being run
even though my new binding invokes "break".
I have no clue why this would fail. In the past I would have
suspected our weird itcl, but I haven't kept up with what has happened
there and I don't know if these suspicions are still current.
Perhaps someone with more time and more recent direct experience could
finish this? It shouldn't take too long...
2000-05-22 Tom Tromey <tromey@cygnus.com>
* console.itb (Console::_build_win): Handle bindings which
are ";". Also, completely override underlying Text binding.
Tom
Index: console.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/console.itb,v
retrieving revision 1.3
diff -u -r1.3 console.itb
--- console.itb 2000/04/14 14:45:37 1.3
+++ console.itb 2000/05/22 20:17:29
@@ -97,7 +97,7 @@
%W delete {cmdmark + 1 char} insert
%W see {insert linestart}
}
-
+
# Control-w deletes previous word.
bind_plain_key $_twin Control-w {
if {[%W compare {insert -1c wordstart} > cmdmark]} {
@@ -116,13 +116,19 @@
# movement. We only need to do this after events we do not
# explicitly override. Note that since the edit line is always the
# last line, we can't possibly go past it, so we don't bother
- # checking that.
+ # checking that. Note also that we check for a binding which is
+ # simply `;'; this lets us handle keys already bound via
+ # bind_plain_key.
foreach event [bind Text] {
- if {[string match *Key* $event] && [bind $_twin $event] == ""} {
- bind $_twin $event {
+ if {[string match *Key* $event]
+ && ([bind $_twin $event] == ""
+ || [bind $_twin $event] == ";")} {
+ bind $_twin $event [bind Text $event]
+ bind $_twin $event {+
if {[%W compare insert <= {cmdmark + 1 char}]} {
%W mark set insert {cmdmark + 1 char}
}
+ break
}
}
}