diff options
Diffstat (limited to 'ranger/core/actions.py')
-rw-r--r-- | ranger/core/actions.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py index 2241bc5b..89c5124b 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -995,6 +995,17 @@ class Actions( # pylint: disable=too-many-instance-attributes,too-many-public-m else: pager.set_source(fobj) + def scroll_preview(self, lines, narg=None): + """:scroll_preview <lines> + +Scroll the file preview by <lines> lines.""" + preview_column = self.ui.browser.columns[-1] + if preview_column.target and preview_column.target.is_file: + if narg is not None: + lines = narg + preview_column.scrollbit = max(0, preview_column.scrollbit + lines) + preview_column.request_redraw() + # -------------------------- # -- Previews # -------------------------- |