Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion jupyter_console/ptshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ class ZMQTerminalInteractiveShell(SingletonConfigurable):
"printf \"\\x1b[38;2;255;100;0mTRUECOLOR\\x1b[0m\\n\"")
)

autoindent = Bool(True, config=True,
help="Autoindent code entered interactively."
)

history_load_length = Integer(1000, config=True,
help="How many history items to load into memory"
)
Expand Down Expand Up @@ -481,7 +485,10 @@ def _(event):
if (not more) and b.accept_handler:
b.validate_and_handle()
else:
b.insert_text('\n' + indent)
if self.autoindent:
b.insert_text('\n' + indent)
else:
b.insert_text('\n')

@kb.add("c-c", filter=has_focus(DEFAULT_BUFFER))
def _(event):
Expand Down