Skip to content

Commit

Permalink
Avoid reading newline while reading history
Browse files Browse the repository at this point in the history
  • Loading branch information
lebr0nli committed Jun 4, 2024
1 parent db3dd4d commit 5f83138
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gdbinit-gep.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ def load_history_strings(self) -> list[str]:
strings = []
if os.path.exists(self.filename):
with open(self.filename) as f:
for string in reversed(f.readlines()):
for string in reversed(f.read().splitlines()):
if self.ignore_duplicates and string in strings:
continue
if string:
Expand Down

0 comments on commit 5f83138

Please sign in to comment.