diff options
author | Syd Polk <spolk@apple.com> | 2000-12-07 19:49:40 +0000 |
---|---|---|
committer | Syd Polk <spolk@apple.com> | 2000-12-07 19:49:40 +0000 |
commit | 6c59086b822186fb6a86bcd9c37502d5cdfae491 (patch) | |
tree | 11016549b6cd5be52320f5f89d735749f546eb61 /gdb | |
parent | f9c9dc7ca5584c24f410712bcc1501d50764e2e9 (diff) | |
download | gdb-6c59086b822186fb6a86bcd9c37502d5cdfae491.tar.gz |
2000-12-01 Larry Smith <lsmith@redhat.com>
* console.itb (invoke): Added logic to allow user to build
up multiline "tk" commands based on results from checking
command with [info complete $cmd]s.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/gdbtk/library/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/gdbtk/library/console.itb | 12 |
2 files changed, 17 insertions, 1 deletions
diff --git a/gdb/gdbtk/library/ChangeLog b/gdb/gdbtk/library/ChangeLog index 6393c397736..89ff853ab94 100644 --- a/gdb/gdbtk/library/ChangeLog +++ b/gdb/gdbtk/library/ChangeLog @@ -16,6 +16,12 @@ (Console::_update_option): New method. (Console::_build_win): Use _set_wrap. +2000-12-01 Larry Smith <lsmith@redhat.com> + + * console.itb (invoke): Added logic to allow user to build + up multiline "tk" commands based on results from checking + command with [info complete $cmd]s. + 2000-11-30 Tom Tromey <tromey@cygnus.com> * srctextwin.ith (enable_disable_at_line): Declare. diff --git a/gdb/gdbtk/library/console.itb b/gdb/gdbtk/library/console.itb index 1f80055aab0..fa88f8d8b8c 100644 --- a/gdb/gdbtk/library/console.itb +++ b/gdb/gdbtk/library/console.itb @@ -385,8 +385,18 @@ body Console::activate {{prompt {}}} { body Console::invoke {} { global gdbtk_state + set text [$_twin get {cmdmark + 1 char} end ] + + if { "[string range $text 0 1]" == "tk" } { + if {! [info complete $text] } { + $_twin insert {insert lineend} " \\\n" + $_twin see insert + return + } + } + incr _invoking - set text [$_twin get {cmdmark + 1 char} {cmdmark lineend}] + if {$text == ""} { set text [lindex $_history 0] $_twin insert {insert lineend} $text |