From 08b18f0f2dd10350529068daab9082463130e448 Mon Sep 17 00:00:00 2001 From: hut Date: Sun, 28 Mar 2010 15:16:13 +0200 Subject: widgets.browserview: draw a border around bookmark list --- ranger/gui/widgets/browserview.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ranger/gui/widgets/browserview.py b/ranger/gui/widgets/browserview.py index ebce9900..6e0fa4ad 100644 --- a/ranger/gui/widgets/browserview.py +++ b/ranger/gui/widgets/browserview.py @@ -108,18 +108,21 @@ class BrowserView(Widget, DisplayableContainer): if '/.' not in item[1].path) def generator(): - return zip(range(self.hei), sorted_bookmarks) + return zip(range(self.hei-1), sorted_bookmarks) try: maxlen = max(len(item[1].path) for i, item in generator()) except ValueError: return - maxlen = min(maxlen + 5, self.wid) + maxlen = min(maxlen + 5, self.wid-1) for line, items in generator(): key, mark = items string = " " + key + ": " + mark.path self.addnstr(line, 0, string.ljust(maxlen), self.wid) + self.win.hline(line, 0, curses.ACS_HLINE, maxlen) + self.win.vline(0, maxlen, curses.ACS_VLINE, line) + self.win.addch(line, maxlen, curses.ACS_LRCORNER) def _draw_borders(self): win = self.win -- cgit 1.4.1-2-gfad0