summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-01-18 22:13:40 +0100
committerhut <hut@lavabit.com>2010-01-18 22:13:40 +0100
commit291ca616093aed257acf950eb6b8d95229767f9d (patch)
tree7eec9ff4be1340adcf5a21389fe76e14c622d107 /ranger
parenteb0630588e44f2c4ddb32247ac979bdfe8c118f4 (diff)
downloadranger-291ca616093aed257acf950eb6b8d95229767f9d.tar.gz
fixed #43: bookmark ` = '
Diffstat (limited to 'ranger')
-rw-r--r--ranger/container/bookmarks.py11
-rw-r--r--ranger/gui/widgets/browserview.py2
2 files changed, 9 insertions, 4 deletions
diff --git a/ranger/container/bookmarks.py b/ranger/container/bookmarks.py
index 4c9a48d4..56671a42 100644
--- a/ranger/container/bookmarks.py
+++ b/ranger/container/bookmarks.py
@@ -31,7 +31,7 @@ class Bookmarks(object):
 
 	last_mtime = None
 	autosave = True
-	load_pattern = re.compile(r"^[\d\w`']:.")
+	load_pattern = re.compile(r"^[\d\w']:.")
 
 	def __init__(self, bookmarkfile, bookmarktype=str, autosave=False):
 		"""<bookmarkfile> specifies the path to the file where
@@ -53,6 +53,8 @@ class Bookmarks(object):
 
 	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()
@@ -72,8 +74,7 @@ class Bookmarks(object):
 			self.update()
 
 	def remember(self, value):
-		"""Bookmarks <value> to the keys ` and '"""
-		self["`"] = value
+		"""Bookmarks <value> to the key '"""
 		self["'"] = value
 		if self.autosave: self.save()
 	
@@ -82,6 +83,8 @@ class Bookmarks(object):
 
 	def __getitem__(self, key):
 		"""Get the bookmark associated with the key"""
+		if key == '`':
+			key = "'"
 		if key in self.dct:
 			return self.dct[key]
 		else:
@@ -92,6 +95,8 @@ class Bookmarks(object):
 		key is expected to be a 1-character string and element of ALLOWED_KEYS.
 		value is expected to be a filesystemobject.
 		"""
+		if key == '`':
+			key = "'"
 		if key in ALLOWED_KEYS:
 			self.dct[key] = value
 			if self.autosave: self.save()
diff --git a/ranger/gui/widgets/browserview.py b/ranger/gui/widgets/browserview.py
index 7a7e43e6..797daa59 100644
--- a/ranger/gui/widgets/browserview.py
+++ b/ranger/gui/widgets/browserview.py
@@ -72,7 +72,7 @@ class BrowserView(Widget, DisplayableContainer):
 		self.need_clear = True
 
 		sorted_bookmarks = sorted(item for item in self.fm.bookmarks \
-				if item[0] != '`' and '/.' not in item[1].path)
+				if '/.' not in item[1].path)
 
 		def generator():
 			return zip(range(self.hei), sorted_bookmarks)