Don't try to insert continuation prompts on self-insert-command

This commit is contained in:
Nathaniel Nicandro 2018-10-06 14:02:29 -05:00
parent 4c95c8c6d2
commit 33495f0281

View file

@ -1509,7 +1509,10 @@ BEG, END, and LEN have the same meaning as in
((= len 0)
(goto-char beg)
(when (jupyter-repl-cell-line-p)
(setq end (jupyter-repl-insert-continuation-prompts end))
;; Avoid doing anything on self insertion
(unless (and (= (point) (1- end))
(not (eq (char-after) ?\n)))
(setq end (jupyter-repl-insert-continuation-prompts end)))
(jupyter-repl-mark-as-cell-code beg end))
(goto-char end)))))