Skip to content

Commit eeb167e

Browse files
authored
Merge pull request #1203 from CyanideByte/empty-prompt-fix
Ignore empty messages
2 parents 3da77f3 + fed4296 commit eeb167e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

interpreter/terminal_interface/terminal_interface.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ def terminal_interface(interpreter, message):
8888
# This is for the terminal interface being used as a CLI — messages are strings.
8989
# This won't fire if they're in the python package, display=True, and they passed in an array of messages (for example).
9090

91+
if message == "":
92+
# Ignore empty messages when user presses enter without typing anything
93+
continue
94+
9195
if message.startswith("%") and interactive:
9296
handle_magic_command(interpreter, message)
9397
continue

0 commit comments

Comments
 (0)