Strip of trailing spaces for history entries

This commit is contained in:
Florian Bruhin 2016-06-09 18:52:08 +02:00
parent b8fba0a138
commit 1d1c71f919
2 changed files with 5 additions and 1 deletions

View File

@ -96,6 +96,7 @@ Fixed
- Fixed sharing of cookies between tabs when `private-browsing` is enabled
- Toggling values with `:set` now uses lower-case values
- Hints now work with (non-standard) links with spaces around the URL
- Strip off trailing spaces for history entries with no title
v0.6.2
------

View File

@ -54,7 +54,10 @@ class Entry:
hidden=self.hidden)
def __str__(self):
return '{} {} {}'.format(int(self.atime), self.url_str(), self.title)
elems = [str(int(self.atime)), self.url_str()]
if self.title:
elems.append(self.title)
return ' '.join(elems)
def __eq__(self, other):
return (self.atime == other.atime and