fixed tab completion with long file names
authorPhillip Susi <phreak@iag.net>
Mon, 17 Jan 2000 02:17:50 +0000 (02:17 +0000)
committerPhillip Susi <phreak@iag.net>
Mon, 17 Jan 2000 02:17:50 +0000 (02:17 +0000)
svn path=/trunk/; revision=935

rosapps/cmd/filecomp.c

index 0fe1b19..678e3a9 100644 (file)
@@ -125,11 +125,15 @@ VOID CompleteFilename (LPTSTR str, INT charcount)
                while (FindNextFile (hFile, &file));
 
                FindClose (hFile);
-
-               _tcscpy (&str[start], directory);
-               _tcscat (&str[start], maxmatch);
-
-               if (!perfectmatch)
+                if( perfectmatch )
+                {
+                   str[start] = '\"';
+                   _tcscpy (&str[start+1], directory);
+                   _tcscat (&str[start], maxmatch);
+                    _tcscat (&str[start], "\"" );
+                }
+
+               else
 #ifdef __REACTOS__
                        Beep (440, 50);
 #else