diff --git a/src/ChangeLog b/src/ChangeLog index 1d95ac2bd..b62da6e1b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +Fri Sep 11 15:27:59 1998 Pavel Machek + + * screen.c: make cd .. from extfs file highlight it + Tue Sep 8 13:10:32 1998 Pavel Roskin * autogen.sh: Don't destroy aclocal.m4 if "macros" directory diff --git a/src/screen.c b/src/screen.c index 3667df10c..0235bd5d3 100644 --- a/src/screen.c +++ b/src/screen.c @@ -814,6 +814,9 @@ paint_panel (WPanel *panel) mini_info_separator (panel); } +/* + * This is used to select xyzzy after you asked for cd .. in xyzzy/ subdir. + */ void Xtry_to_select (WPanel *panel, char *name) { @@ -836,10 +839,17 @@ Xtry_to_select (WPanel *panel, char *name) } if (subdir < name) subdir = name; - + /* Search that subdirectory, if found select it */ for (i = 0; i < panel->count; i++){ - if (strcmp (subdir, panel->dir.list [i].fname)) + char c, *s = panel->dir.list [i].fname; + if (strncmp (subdir, s, strlen(s))) + continue; + + c = subdir[ strlen(s) ]; + /* This ugly hack is for returning from extfs archive: now + that archive will be highlighted when you cd .. from it. */ + if ((c!=0) && (c!='#')) continue; if (i != panel->selected){