Fix continuation prompt insertion

* Remove the invisible character inserted along with the
  continuation prompt as it is really unneeded.

* Make the inserted space two characters wide. For some
  reason this is needed, otherwise the continuation prompt
  will be one character short when starting up a REPL from
  the byte compiled functions. Curiously when I evaluate
  `jupyter-repl-insert-prompt` in the current Emacs
  session, the prompt looks fine afterwards.
This commit is contained in:
Nathaniel Nicandro 2018-10-06 15:59:03 -05:00
parent c651f16ae2
commit 5caf82cf81

View file

@ -715,13 +715,11 @@ interpreted as `in'."
:properties '(invisible t front-sticky t) " ")) :properties '(invisible t front-sticky t) " "))
((eq type 'continuation) ((eq type 'continuation)
(jupyter-repl--make-prompt (jupyter-repl--make-prompt
" " 'jupyter-repl-input-prompt ;; This needs to be two characters wide for some
`(read-only nil rear-nonsticky t)) ;; reason, otherwise the continuation prompts will
;; Prevent prompt overlay from inheriting text properities of cell code. ;; be missing one character.
;; See the note for input prompts. " " 'jupyter-repl-input-prompt
(jupyter-repl-insert `(read-only nil rear-nonsticky t)))))))
:read-only nil
:properties '(invisible t rear-nonsticky t front-sticky t) " "))))))
(defun jupyter-repl-cell-update-prompt (str) (defun jupyter-repl-cell-update-prompt (str)
"Update the current cell's input prompt. "Update the current cell's input prompt.