mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 01:50:24 +08:00
* gdbtk.tcl (create_command_window): Change a misspelled "get"
to the intended "cget". (delete_line): Fix so it deletes the current line at the insertion cursor.
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
start-sanitize-gdbtk
|
||||||
|
Fri May 17 13:54:34 1996 Fred Fish <fnf@cygnus.com>
|
||||||
|
|
||||||
|
* gdbtk.tcl (create_command_window): Change a misspelled "get"
|
||||||
|
to the intended "cget".
|
||||||
|
(delete_line): Fix so it deletes the current line at the
|
||||||
|
insertion cursor.
|
||||||
|
end-sanitize-gdbtk
|
||||||
|
|
||||||
Fri May 17 13:31:04 1996 Stan Shebs <shebs@andros.cygnus.com>
|
Fri May 17 13:31:04 1996 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
* sh-stub.c: New file, was config/sh/stub.c.
|
* sh-stub.c: New file, was config/sh/stub.c.
|
||||||
|
@ -2315,7 +2315,7 @@ proc create_command_window {} {
|
|||||||
set bsBinding [bind Text <BackSpace>]
|
set bsBinding [bind Text <BackSpace>]
|
||||||
bind .cmd.text <Delete> "delete_char %W ; $bsBinding; break"
|
bind .cmd.text <Delete> "delete_char %W ; $bsBinding; break"
|
||||||
bind .cmd.text <BackSpace> {
|
bind .cmd.text <BackSpace> {
|
||||||
if {([%W get -state] == "disabled")} { break }
|
if {([%W cget -state] == "disabled")} { break }
|
||||||
delete_char %W
|
delete_char %W
|
||||||
}
|
}
|
||||||
bind .cmd.text <Control-u> {
|
bind .cmd.text <Control-u> {
|
||||||
@ -2400,18 +2400,27 @@ proc create_command_window {} {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Trim one character off the command line. The argument is ignored.
|
||||||
|
|
||||||
proc delete_char {win} {
|
proc delete_char {win} {
|
||||||
global command_line
|
global command_line
|
||||||
set tmp [expr [string length $command_line] - 2]
|
set tmp [expr [string length $command_line] - 2]
|
||||||
set command_line [string range $command_line 0 $tmp]
|
set command_line [string range $command_line 0 $tmp]
|
||||||
}
|
}
|
||||||
|
|
||||||
proc delete_line {win} {
|
# FIXME: This should actually check that the first characters of the current
|
||||||
global command_line
|
# line match the gdb prompt, since the user can move the insertion point
|
||||||
|
# anywhere. It should also check that the insertion point is in the last
|
||||||
|
# line of the text widget.
|
||||||
|
|
||||||
$win delete {end linestart + 6 chars} end
|
proc delete_line {win} {
|
||||||
$win see insert
|
global command_line
|
||||||
set command_line {}
|
global gdb_prompt
|
||||||
|
|
||||||
|
set tmp [string length $gdb_prompt]
|
||||||
|
$win delete "insert linestart + $tmp chars" "insert lineend"
|
||||||
|
$win see insert
|
||||||
|
set command_line {}
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user