fix(strider): do not descend into host folder (#753)
This commit is contained in:
parent
d001dea238
commit
af62afec9c
1 changed files with 8 additions and 2 deletions
|
|
@ -35,9 +35,15 @@ impl ZellijPlugin for State {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Key::Left | Key::Char('h') => {
|
Key::Left | Key::Char('h') => {
|
||||||
|
if self.path.components().count() > 2 {
|
||||||
|
// don't descend into /host
|
||||||
|
// the reason this is a hard-coded number (2) and not "== ROOT"
|
||||||
|
// or some such is that there are certain cases in which self.path
|
||||||
|
// is empty and this will work then too
|
||||||
self.path.pop();
|
self.path.pop();
|
||||||
refresh_directory(self);
|
refresh_directory(self);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Key::Char('.') => {
|
Key::Char('.') => {
|
||||||
self.toggle_hidden_files();
|
self.toggle_hidden_files();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue