* M-b
@ 2000-05-22 13:19 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2000-05-22 13:19 UTC (permalink / raw)
To: Insight List
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
}
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-05-22 13:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-22 13:19 M-b Tom Tromey
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).