* gdbtk.tcl (files_command): Correctly insert list of files into
authorTom Tromey <tromey@redhat.com>
Thu, 16 May 1996 18:05:26 +0000 (18:05 +0000)
committerTom Tromey <tromey@redhat.com>
Thu, 16 May 1996 18:05:26 +0000 (18:05 +0000)
        listbox widget.

gdb/ChangeLog
gdb/gdbtk.tcl

index dac8eb4e79813abc95273350d64e3f7e72bed420..b2fc6c819bcd788f13559734b22f47983d2c099d 100644 (file)
@@ -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.
 
index f712c116649d1dbde256aa743c417dfc1fbee168..da602c8d9a03a2f63997e815ca1a257e4e3d1c44 100644 (file)
@@ -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
This page took 0.030078 seconds and 4 git commands to generate.