diff options
author | toonn <toonn@toonn.io> | 2018-10-03 20:18:47 +0200 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2019-11-06 20:14:17 +0100 |
commit | 6bd428ff46a398603b108c897e48c98d2a0e536f (patch) | |
tree | 0f336e997b7093df515a657faa4260f63a8604b7 /ranger | |
parent | a9aa71cfd91cb33cc9968e936e37df43b76daf6d (diff) | |
download | ranger-6bd428ff46a398603b108c897e48c98d2a0e536f.tar.gz |
Placate our pep 8 overlords
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/gui/widgets/browsercolumn.py | 3 | ||||
-rw-r--r-- | ranger/gui/widgets/pager.py | 13 |
2 files changed, 10 insertions, 6 deletions
diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py index ecc66f44..1412ef6a 100644 --- a/ranger/gui/widgets/browsercolumn.py +++ b/ranger/gui/widgets/browsercolumn.py @@ -48,6 +48,9 @@ class BrowserColumn(Pager): # pylint: disable=too-many-instance-attributes level 0 => current file/directory level <0 => parent directories """ + self.need_redraw = False + self.image = None + self.need_clear_image = True Pager.__init__(self, win) Widget.__init__(self, win) # pylint: disable=non-parent-init-called self.level = level diff --git a/ranger/gui/widgets/pager.py b/ranger/gui/widgets/pager.py index fd0e7887..064f28ca 100644 --- a/ranger/gui/widgets/pager.py +++ b/ranger/gui/widgets/pager.py @@ -247,15 +247,16 @@ class Pager(Widget): # pylint: disable=too-many-instance-attributes try: line = self._get_line(i).expandtabs(4) for part in ((0,) if not - self.fm.settings.wrap_plaintext_previews else - range(max(1, ((len(line) - 1) // self.wid) + 1))): + self.fm.settings.wrap_plaintext_previews else + range(max(1, ((len(line) - 1) // self.wid) + 1))): shift = part * self.wid if self.markup == 'ansi': - line_bit = ansi.char_slice(line, startx + shift, - self.wid + shift) + ansi.reset + line_bit = (ansi.char_slice(line, startx + shift, + self.wid + shift) + + ansi.reset) else: - line_bit = line[startx + shift - :self.wid + startx + shift] + line_bit = line[startx + shift:self.wid + startx + + shift] yield line_bit.rstrip().replace('\r\n', '\n') except IndexError: return |