diff options
-rw-r--r-- | ranger/gui/widgets/browsercolumn.py | 12 | ||||
-rw-r--r-- | ranger/gui/widgets/browserview.py | 2 |
2 files changed, 3 insertions, 11 deletions
diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py index 06a89627..7de716c7 100644 --- a/ranger/gui/widgets/browsercolumn.py +++ b/ranger/gui/widgets/browsercolumn.py @@ -339,19 +339,11 @@ class BrowserColumn(Pager): self.scroll_begin = self._get_scroll_begin() self.target.scroll_begin = self.scroll_begin - # TODO: does not work if options.scroll_offset is high, - # relative > 1 and you scroll from scroll_begin = 1 to 0 def scroll(self, relative): """scroll by n lines""" self.need_redraw = True - self._set_scroll_begin() - old_value = self.target.scroll_begin - self.target.scroll_begin += relative - self._set_scroll_begin() - - if self.target.scroll_begin == old_value: - self.target.move(relative = relative) - self.target.scroll_begin += relative + self.target.move(relative=relative) + self.target.scroll_begin += 3 * relative def __str__(self): return self.__class__.__name__ + ' at level ' + str(self.level) diff --git a/ranger/gui/widgets/browserview.py b/ranger/gui/widgets/browserview.py index 376c01e0..e31a21ff 100644 --- a/ranger/gui/widgets/browserview.py +++ b/ranger/gui/widgets/browserview.py @@ -221,7 +221,7 @@ class BrowserView(Widget, DisplayableContainer): left += wid def click(self, event): - n = event.ctrl() and 1 or 3 + n = event.ctrl() and 5 or 1 if event.pressed(4): self.main_column.scroll(relative = -n) elif event.pressed(2) or event.key_invalid(): |