From 1ef0ade55d7e678ee036a821b26dbf9dc95fb877 Mon Sep 17 00:00:00 2001 From: hut Date: Sat, 2 Oct 2010 16:10:21 +0200 Subject: core.fm: Don't check bookmarks when not needed --- ranger/core/actions.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ranger/core/actions.py') diff --git a/ranger/core/actions.py b/ranger/core/actions.py index 59902bab..4b3752ef 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -472,6 +472,7 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): def enter_bookmark(self, key): """Enter the bookmark with the name """ try: + self.bookmarks.update_if_outdated() destination = self.bookmarks[key] cwd = self.env.cwd if destination.path != cwd.path: @@ -482,10 +483,12 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): def set_bookmark(self, key): """Set the bookmark with the name to the current directory""" + self.bookmarks.update_if_outdated() self.bookmarks[key] = self.env.cwd def unset_bookmark(self, key): """Delete the bookmark with the name """ + self.bookmarks.update_if_outdated() self.bookmarks.delete(key) def draw_bookmarks(self): -- cgit 1.4.1-2-gfad0