aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>1996-05-16 18:05:26 +0000
committerTom Tromey <tromey@redhat.com>1996-05-16 18:05:26 +0000
commitf4e769dc02fd968cb5a9e845cd544fd158ca4269 (patch)
treec8b98ecf43125fc3fd27f43e3a3b54d70a548125 /gdb
parent76e641bdd5cf34b69c09bafbe0523054ec7c3d56 (diff)
downloadgdb-f4e769dc02fd968cb5a9e845cd544fd158ca4269.zip
gdb-f4e769dc02fd968cb5a9e845cd544fd158ca4269.tar.gz
gdb-f4e769dc02fd968cb5a9e845cd544fd158ca4269.tar.bz2
* gdbtk.tcl (files_command): Correctly insert list of files into
listbox widget.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/gdbtk.tcl17
2 files changed, 5 insertions, 15 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index dac8eb4..b2fc6c8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,6 +1,9 @@
start-sanitize-gdbtk
Thu May 16 11:42:58 1996 Tom Tromey <tromey@creche.cygnus.com>
+ * gdbtk.tcl (files_command): Correctly insert list of files into
+ listbox widget.
+
* gdbtk.tcl (files_command): listbox command no longer accepts
-geometry.
diff --git a/gdb/gdbtk.tcl b/gdb/gdbtk.tcl
index f712c11..da602c8 100644
--- a/gdb/gdbtk.tcl
+++ b/gdb/gdbtk.tcl
@@ -1981,21 +1981,8 @@ proc files_command {} {
button .files_window.close -text Close -command {destroy .files_window}
.files_window.list configure -selectmode single
- # Get the file list from GDB, sort it, and format it as one entry per line.
- set lastSeen {}; # Value that won't appear in
- # list.
- set fileList {}
- foreach file [lsort [gdb_listfiles]] {
- if {$file != $lastSeen} then {
- lappend fileList $file
- set lastSeen $file
- }
- }
- set filelist [join [lsort [gdb_listfiles]] "\n"]
-
- # Insert the file list into the widget
-
- eval .files_window.list insert 0 $filelist
+ # Get the file list from GDB, sort it, and insert into the widget.
+ eval .files_window.list insert 0 [lsort [gdb_listfiles]]
pack .files_window.close -side bottom -fill x -expand no -anchor s
pack .files_window.scroll -side right -fill both