aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbtk.tcl
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1994-09-18 00:07:56 +0000
committerStu Grossman <grossman@cygnus>1994-09-18 00:07:56 +0000
commita5cffdc44a230f803866d2e13aed569e6e1790ec (patch)
treefe519b3dee5baeab6c3ff8086ae8892347e5cf54 /gdb/gdbtk.tcl
parent4c664b8d0ac4c98faac11fd247688fdeae5cea86 (diff)
downloadgdb-a5cffdc44a230f803866d2e13aed569e6e1790ec.zip
gdb-a5cffdc44a230f803866d2e13aed569e6e1790ec.tar.gz
gdb-a5cffdc44a230f803866d2e13aed569e6e1790ec.tar.bz2
* gdbtk.tcl: Let ^U delete lines in the command window.
Diffstat (limited to 'gdb/gdbtk.tcl')
-rw-r--r--gdb/gdbtk.tcl9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/gdbtk.tcl b/gdb/gdbtk.tcl
index a142c3d..9f52096 100644
--- a/gdb/gdbtk.tcl
+++ b/gdb/gdbtk.tcl
@@ -1283,6 +1283,7 @@ bind .command.text <Key-Return> {
bind .command.text <Enter> {focus %W}
bind .command.text <Delete> {delete_char %W}
bind .command.text <BackSpace> {delete_char %W}
+bind .command.text <Control-u> {delete_line %W}
proc delete_char {win} {
global command_line
@@ -1292,4 +1293,12 @@ proc delete_char {win} {
set command_line [string range $command_line 0 $tmp]
}
+proc delete_line {win} {
+ global command_line
+
+ $win delete {end linestart + 6 chars} end
+ $win yview -pickplace insert
+ set command_line {}
+}
+
wm minsize .command 1 1