We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7d8b77 commit 87a85dfCopy full SHA for 87a85df
bpython/curtsiesfrontend/repl.py
@@ -1004,9 +1004,9 @@ def send_session_to_external_editor(self, filename=None):
1004
)
1005
return
1006
lines = text.split("\n")
1007
- if not lines[-1].strip():
+ if len(lines) and not lines[-1].strip():
1008
lines.pop() # strip last line if empty
1009
- if lines[-1].startswith("### "):
+ if len(lines) and lines[-1].startswith("### "):
1010
current_line = lines[-1][4:]
1011
else:
1012
current_line = ""
0 commit comments