diff options
author | toonn <toonn@toonn.io> | 2020-07-07 20:25:34 +0200 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2020-07-07 20:26:44 +0200 |
commit | 6dc6a4c9b1aaaedff7c74c811dfd48e76f87a10a (patch) | |
tree | d0fee4a1fa0e2fb3725878f666cc19b600307ec2 /ranger | |
parent | 81305e1f53b0ef98d863e987a3551025633a076b (diff) | |
download | ranger-6dc6a4c9b1aaaedff7c74c811dfd48e76f87a10a.tar.gz |
Missed a couple py3 version checks
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/gui/widgets/console.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ranger/gui/widgets/console.py b/ranger/gui/widgets/console.py index bf8a12c0..f5d54cd0 100644 --- a/ranger/gui/widgets/console.py +++ b/ranger/gui/widgets/console.py @@ -10,6 +10,7 @@ import os import re from collections import deque +from ranger import PY3 from ranger.gui.widgets import Widget from ranger.ext.direction import Direction from ranger.ext.widestring import uwid, WideString @@ -228,7 +229,7 @@ class Console(Widget): # pylint: disable=too-many-instance-attributes,too-many- except ValueError: return unicode_buffer, line, pos - if self.fm.py3: + if PY3: if len(unicode_buffer) >= 4: unicode_buffer = "" if ord(key) in range(0, 256): @@ -280,7 +281,7 @@ class Console(Widget): # pylint: disable=too-many-instance-attributes,too-many- direction = Direction(keywords) if direction.horizontal(): # Ensure that the pointer is moved utf-char-wise - if self.fm.py3: + if PY3: if self.question_queue: umax = len(self.question_queue[0][0]) + 1 - self.wid else: @@ -425,7 +426,7 @@ class Console(Widget): # pylint: disable=too-many-instance-attributes,too-many- self.close(trigger_cancel_function=False) return # Delete utf-char-wise - if self.fm.py3: + if PY3: left_part = self.line[:self.pos + mod] self.pos = len(left_part) self.line = left_part + self.line[self.pos + 1:] |