Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 10992f0

Browse filesBrowse files
lvgelderthomasballinger
authored andcommitted
fix bpython#432 bpython-curtsies crashes if no readline history on enter
It actually works correctly if there is no existing history the first time you press enter. But then insert_into_history sets entries to [] and tries to read from the history file, which will do nothing if the history file is empty. History should be fixed properly on master, but for now just fixing the call which shouldn't have been rl_history.last() in the first place.
1 parent 5342649 commit 10992f0
Copy full SHA for 10992f0

1 file changed

+1-1Lines changed: 1 addition & 1 deletion

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎bpython/curtsiesfrontend/repl.py‎

Copy file name to clipboardExpand all lines: bpython/curtsiesfrontend/repl.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ def on_enter(self, insert_into_history=True):
371371
self.highlighted_paren = None
372372

373373
self.rl_history.append(self._current_line)
374-
self.rl_history.last()
374+
self.rl_history.reset()
375375
self.history.append(self._current_line)
376376
line = self._current_line
377377
#self._current_line = ''

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.