diff options
author | hut <hut@hut.pm> | 2018-05-16 11:57:15 +0200 |
---|---|---|
committer | hut <hut@hut.pm> | 2018-05-16 12:10:29 +0200 |
commit | 11549e2c0c73a8a0bb543801af4e134b3e076095 (patch) | |
tree | 10c74f9a20d913709af2fc304926a2793dd2ef75 | |
parent | 994e8f3095040ac69512e84501ccc7f99b788a4a (diff) | |
download | ranger-11549e2c0c73a8a0bb543801af4e134b3e076095.tar.gz |
Revert "ranger <path> can select files"
Due to this commit, pressing `<Right>` on a file does nothing. Normally it should open the file. Until this is fixed, I'll remove this commit to restore this basic functionality. Unfortunately, the revert makes ranger crash when run like `ranger <somefilename>`, but this is a much less frequent use case, so the revert is still warranted. This reverts commit 2288a40b45ccdc57d287648c96c5bbe378b95a6d.
-rw-r--r-- | ranger/core/tab.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/ranger/core/tab.py b/ranger/core/tab.py index 7bb45d75..1d5e69d4 100644 --- a/ranger/core/tab.py +++ b/ranger/core/tab.py @@ -4,7 +4,7 @@ from __future__ import (absolute_import, division, print_function) import os -from os.path import abspath, normpath, join, expanduser, isdir, dirname +from os.path import abspath, normpath, join, expanduser, isdir import sys from ranger.container import settings @@ -123,11 +123,9 @@ class Tab(FileManagerAware, SettingsAware): # pylint: disable=too-many-instance # get the absolute path path = normpath(join(self.path, expanduser(path))) - selectfile = None if not isdir(path): - selectfile = path - path = dirname(path) + return False new_thisdir = self.fm.get_directory(path) try: @@ -157,8 +155,6 @@ class Tab(FileManagerAware, SettingsAware): # pylint: disable=too-many-instance self.thisdir.sort_directories_first = self.fm.settings.sort_directories_first self.thisdir.sort_reverse = self.fm.settings.sort_reverse self.thisdir.sort_if_outdated() - if selectfile: - self.thisdir.move_to_obj(selectfile) if previous and previous.path != path: self.thisfile = self.thisdir.pointed_obj else: |