summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-03-28 15:16:13 +0200
committerhut <hut@lavabit.com>2010-03-28 15:16:13 +0200
commit08b18f0f2dd10350529068daab9082463130e448 (patch)
tree7b2c6cc622f2f150bfa4c2a90924e9f7454486ee /ranger
parentad482d30ff5564979c7789906cc53d4ed8920ae2 (diff)
downloadranger-08b18f0f2dd10350529068daab9082463130e448.tar.gz
widgets.browserview: draw a border around bookmark list
Diffstat (limited to 'ranger')
-rw-r--r--ranger/gui/widgets/browserview.py7
1 files 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