From 28e13b122c9e695584633a6d4fcaa2006d415357 Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 1 Jan 2010 16:40:05 +0100 Subject: sort bookmark list --- ranger/gui/widgets/browserview.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ranger/gui/widgets/browserview.py b/ranger/gui/widgets/browserview.py index 488b7cfd..c638f15d 100644 --- a/ranger/gui/widgets/browserview.py +++ b/ranger/gui/widgets/browserview.py @@ -57,8 +57,9 @@ class BrowserView(Widget, DisplayableContainer): def _draw_bookmarks(self): self.need_clear = True + sorted_bookmarks = sorted(self.fm.bookmarks) def generator(): - return zip(range(self.hei), self.fm.bookmarks) + return zip(range(self.hei), sorted_bookmarks) maxlen = max(len(item[1].path) for i, item in generator()) maxlen = min(maxlen + 5, self.wid) -- cgit 1.4.1-2-gfad0