diff options
author | pavel <pavel989@gmail.com> | 2018-10-07 18:27:50 -0400 |
---|---|---|
committer | pavel <pavel989@gmail.com> | 2018-10-07 18:27:50 -0400 |
commit | af80275d890f3d8cf1ebdeb60f55798fdc792440 (patch) | |
tree | 0f22b7ae2d5445869733dba1b4cd194269cea9c4 | |
parent | 40f13d845bd492003dce09277f006249f6aa628c (diff) | |
download | ranger-af80275d890f3d8cf1ebdeb60f55798fdc792440.tar.gz |
fixed CI errors
-rw-r--r-- | ranger/gui/widgets/browsercolumn.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py index c0446995..6f08f329 100644 --- a/ranger/gui/widgets/browsercolumn.py +++ b/ranger/gui/widgets/browsercolumn.py @@ -95,13 +95,14 @@ class BrowserColumn(Pager): # pylint: disable=too-many-instance-attributes elif self.level == 0: self.fm.thisdir.move_to_obj(clicked_file) self.fm.execute_file(clicked_file) - elif self.target.is_file: ##scrolling through file preview? - if direction > 0 and len(self.lines) > self.hei+self.scrollbit: ##is there more to show? - self.scrollbit += direction # influence the start point - if self.scrollbit < 0: #make sure we dont scroll before or after the file + elif self.target.is_file: # scrolling through file preview? + # Is there more to show? + if direction > 0 and len(self.lines) > self.hei + self.scrollbit: + self.scrollbit += direction # influence the start point + if self.scrollbit < 0: # make sure we dont scroll before or after the file self.scrollbit = 0 - if direction < 0 and self.scrollbit > 0: ## have we reached the the top - self.scrollbit += direction # influence the start point + if direction < 0 and self.scrollbit > 0: # have we reached the the top + self.scrollbit += direction # influence the start point self.need_redraw = True else: if self.level > 0 and not direction: @@ -162,7 +163,7 @@ class BrowserColumn(Pager): # pylint: disable=too-many-instance-attributes if target != self.old_dir: self.need_redraw = True self.old_dir = target - self.scrollbit = 0 # reset scroll start + self.scrollbit = 0 # reset scroll start if target: target.use() |