diff options
author | hut <hut@lavabit.com> | 2010-03-27 04:04:21 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-03-27 04:04:21 +0100 |
commit | 6099d9a30611e406afd5a257acd4b9bcb6954857 (patch) | |
tree | 6e73db30062af77f5696f59e294a72d266b3dde5 /ranger | |
parent | b4ed18002b30bb7df6e4fd564175b5aa3c523e3c (diff) | |
download | ranger-6099d9a30611e406afd5a257acd4b9bcb6954857.tar.gz |
fixed #74 and closed #67 (was fixed earlier)
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/gui/widgets/console.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ranger/gui/widgets/console.py b/ranger/gui/widgets/console.py index 20a75c4e..0502e624 100644 --- a/ranger/gui/widgets/console.py +++ b/ranger/gui/widgets/console.py @@ -74,12 +74,16 @@ class Console(Widget): self.win.erase() self.addstr(0, 0, self.prompt) - self.addstr(self.line) + overflow = -self.wid + len(self.prompt) + len(self.line) + 1 + if overflow > 0: + self.addstr(self.line[overflow:]) + else: + self.addstr(self.line) def finalize(self): try: self.fm.ui.win.move(self.y, - self.x + self.pos + len(self.prompt)) + self.x + min(self.wid-1, self.pos + len(self.prompt))) except: pass |