aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1996-06-20 15:50:37 +0000
committerFred Fish <fnf@specifix.com>1996-06-20 15:50:37 +0000
commit3f8eefba65c6f4b9c20d5f802451944bbe7e98ee (patch)
treef858c83b00bc57802547ded95162f9e63f7b0926 /gdb
parent793f9558f89a23bcfe5c52d9d991a13e539da103 (diff)
downloadgdb-3f8eefba65c6f4b9c20d5f802451944bbe7e98ee.zip
gdb-3f8eefba65c6f4b9c20d5f802451944bbe7e98ee.tar.gz
gdb-3f8eefba65c6f4b9c20d5f802451944bbe7e98ee.tar.bz2
* gdbtk.tcl (gdbtk_tcl_readline_begin): Handle backspace to
avoid backing up over prompt. At every input, make sure insert point is at least after command start, handle control-u to delete current input line. (tclsh): Handle backspace to avoid backing up over prompt. Handle control-u to delete current input line.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/gdbtk.tcl29
2 files changed, 38 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 07de414..fef832e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,4 +1,13 @@
start-sanitize-gdbtk
+Thu Jun 20 08:18:59 1996 Fred Fish <fnf@cygnus.com>
+
+ * gdbtk.tcl (gdbtk_tcl_readline_begin): Handle backspace to
+ avoid backing up over prompt. At every input, make sure insert
+ point is at least after command start, handle control-u to delete
+ current input line.
+ (tclsh): Handle backspace to avoid backing up over prompt. Handle
+ control-u to delete current input line.
+
Wed Jun 19 17:23:38 1996 Geoffrey Noer <noer@cygnus.com>
* configure.in: disable gdbtk for *cygwin32* hosted compiles
diff --git a/gdb/gdbtk.tcl b/gdb/gdbtk.tcl
index 2bb5b27..2770166 100644
--- a/gdb/gdbtk.tcl
+++ b/gdb/gdbtk.tcl
@@ -302,6 +302,23 @@ proc gdbtk_tcl_readline_begin {message} {
set readline_text [.rl.text get cmdstart {end - 1 char}]
.rl.text mark set cmdstart insert
}
+ bind .rl.text <BackSpace> {
+ if [%W compare insert > cmdstart] {
+ %W delete {insert - 1 char} insert
+ } else {
+ bell
+ }
+ break
+ }
+ bind .rl.text <Any-Key> {
+ if [%W compare insert < cmdstart] {
+ %W mark set insert end
+ }
+ }
+ bind .rl.text <Control-u> {
+ %W delete cmdstart "insert lineend"
+ %W see insert
+ }
bindtags .rl.text {.rl.text Text all}
}
@@ -3242,11 +3259,23 @@ proc tclsh {} {
# Keybindings that limit input and evaluate things
bind .eval.text <Return> { evaluate_tcl_command .eval.text ; break }
+ bind .eval.text <BackSpace> {
+ if [%W compare insert > cmdstart] {
+ %W delete {insert - 1 char} insert
+ } else {
+ bell
+ }
+ break
+ }
bind .eval.text <Any-Key> {
if [%W compare insert < cmdstart] {
%W mark set insert end
}
}
+ bind .eval.text <Control-u> {
+ %W delete cmdstart "insert lineend"
+ %W see insert
+ }
bindtags .eval.text {.eval.text Text all}
}