From cc964fdf27dbe792ca19adf798f9d278f92d5356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Sat, 3 Mar 2018 23:02:19 +0100 Subject: [PATCH] Strip newlines from stored history in HistoryMonitor --- lib/tfw/components/history_monitor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tfw/components/history_monitor.py b/lib/tfw/components/history_monitor.py index 553d6bb..4f0eba8 100644 --- a/lib/tfw/components/history_monitor.py +++ b/lib/tfw/components/history_monitor.py @@ -26,7 +26,7 @@ class HistoryMonitor: def _fetch_history(self): with open(self.histfile, 'r') as ifile: - self._history = ifile.readlines() + self._history = [line.rstrip() for line in ifile.readlines()] def watch(self): self.observer.start()