From 15f15c9302aa96759028c457f3b6b8b87371336d Mon Sep 17 00:00:00 2001 From: Brobin Date: Tue, 28 Apr 2015 22:23:28 -0500 Subject: [PATCH] retain history order by reversing the list --- rtv/history.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rtv/history.py b/rtv/history.py index a91e391..8db031e 100644 --- a/rtv/history.py +++ b/rtv/history.py @@ -23,7 +23,8 @@ def load_history(): path = history_path() if os.path.exists(path): with open(path) as history_file: - history = [line.strip() for line in history_file] + # reverse the list so the newest ones are first + history = [line.strip() for line in history_file][::-1] return OrderedSet(history) return OrderedSet()