Only use backspace for back
This commit is contained in:
parent
2fb5265463
commit
6f72c97794
1 changed files with 3 additions and 7 deletions
|
@ -264,13 +264,6 @@ class MainWindow(Gtk.ApplicationWindow):
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
def _navigate_to(self, path: Path):
|
def _navigate_to(self, path: Path):
|
||||||
# Check if we have history and if target is where we came from
|
|
||||||
if self.directory_history:
|
|
||||||
if path == self.directory_history[-1]:
|
|
||||||
self._navigate_back()
|
|
||||||
return
|
|
||||||
|
|
||||||
# Regular directory navigation
|
|
||||||
self.directory_history.append(Path(os.getcwd()))
|
self.directory_history.append(Path(os.getcwd()))
|
||||||
os.chdir(path)
|
os.chdir(path)
|
||||||
self._populate_file_list()
|
self._populate_file_list()
|
||||||
|
@ -292,6 +285,9 @@ class MainWindow(Gtk.ApplicationWindow):
|
||||||
|
|
||||||
file_item = cast(FileItem, item)
|
file_item = cast(FileItem, item)
|
||||||
|
|
||||||
|
if file_item.file_type != FileType.DIRECTORY:
|
||||||
|
continue
|
||||||
|
|
||||||
if current_dir == file_item.full_path:
|
if current_dir == file_item.full_path:
|
||||||
self.list_view.scroll_to(
|
self.list_view.scroll_to(
|
||||||
i, Gtk.ListScrollFlags.SELECT | Gtk.ListScrollFlags.FOCUS, None
|
i, Gtk.ListScrollFlags.SELECT | Gtk.ListScrollFlags.FOCUS, None
|
||||||
|
|
Loading…
Reference in a new issue