about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/container/bookmarks.py16
-rw-r--r--ranger/core/actions.py2
2 files changed, 8 insertions, 10 deletions
diff --git a/ranger/container/bookmarks.py b/ranger/container/bookmarks.py
index 9d00e9c8..02f3e3bc 100644
--- a/ranger/container/bookmarks.py
+++ b/ranger/container/bookmarks.py
@@ -43,14 +43,6 @@ class Bookmarks(object):
 
         self._set_dict(new_dict, original=new_dict)
 
-    def delete(self, key):
-        """Delete the bookmark with the given key"""
-        if key == '`':
-            key = "'"
-        if key in self.dct:
-            del self.dct[key]
-            if self.autosave: self.save()
-
     def enter(self, key):
         """Enter the bookmark with the given key.
 
@@ -72,7 +64,13 @@ class Bookmarks(object):
         if self.autosave: self.save()
 
     def __delitem__(self, key):
-        self.delete(key)
+        """Delete the bookmark with the given key"""
+        if key == '`':
+            key = "'"
+        if key in self.dct:
+            del self.dct[key]
+            if self.autosave: self.save()
+
 
     def __iter__(self):
         return iter(self.dct.items())
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index 63916145..e692eb39 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -790,7 +790,7 @@ class Actions(FileManagerAware, SettingsAware):
     def unset_bookmark(self, key):
         """Delete the bookmark with the name <key>"""
         self.bookmarks.update_if_outdated()
-        self.bookmarks.delete(str(key))
+        del self.bookmarks[str(key)]
 
     def draw_bookmarks(self):
         self.ui.browser.draw_bookmarks = True