FilenameEditField.st
changeset 16 7a977f95170b
parent 15 11b9516a56bb
child 24 6704fad5eb7d
--- a/FilenameEditField.st	Sun Aug 07 22:50:26 1994 +0200
+++ b/FilenameEditField.st	Fri Aug 12 01:48:51 1994 +0200
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1994 by Claus Gittinger
               All Rights Reserved
 
-$Header: /cvs/stx/stx/libwidg2/FilenameEditField.st,v 1.2 1994-08-07 20:50:26 claus Exp $
+$Header: /cvs/stx/stx/libwidg2/FilenameEditField.st,v 1.3 1994-08-11 23:48:51 claus Exp $
 '!
 
 !FilenameEditField class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libwidg2/FilenameEditField.st,v 1.2 1994-08-07 20:50:26 claus Exp $
+$Header: /cvs/stx/stx/libwidg2/FilenameEditField.st,v 1.3 1994-08-11 23:48:51 claus Exp $
 "
 !
 
@@ -67,17 +67,18 @@
             f := self contents asFilename.
             matchSet := f filenameCompletion.
             matchSet size ~~ 1 ifTrue:[
-                f directoryName printNL.
                 self changed:#directory with:f directoryName.
                 device beep
             ].
             name := f asString.
-            f isDirectory ifTrue:[
-                (f asString endsWith:(Filename separator)) ifFalse:[
-                    f := f construct:''
+            matchSet size == 1 ifTrue:[
+                f isDirectory ifTrue:[
+                    (name endsWith:(Filename separator)) ifFalse:[
+                        name := (f construct:'') asString
+                    ].
                 ]
             ].
-            self contents:(f asString).
+            self contents:name.
             self cursorToEndOfLine.
             ^ self
         ].