Skip to content

Commit ef7234a

Browse files
fix ctrl-d exiting on non-empty line
--HG-- branch : scroll-frontend
1 parent 99c10ca commit ef7234a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bpython/curtsiesfrontend/repl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,8 @@ def process_event(self, e):
288288
elif e in key_dispatch[self.config.suspend_key]: #TODO
289289
raise SystemExit()
290290
elif e in ("",) + key_dispatch[self.config.exit_key]:
291-
raise SystemExit()
291+
if self._current_line == '':
292+
raise SystemExit()
292293
elif e in ("\n", "\r", "PAD_ENTER"):
293294
self.on_enter()
294295
self.update_completion()

0 commit comments

Comments
 (0)