Skip to content

Commit d0ccb98

Browse files
committed
jupyter-repl-update-cell-count: Only reset input prompts
There is no need to reset the prompt when it isn't displaying the cell count. This also ensures that a kernel that shows a prompt other than the input prompt doesn't get overwritten.
1 parent 098d598 commit d0ccb98

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jupyter-repl.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,9 @@ should be a face that the prompt will use and defaults to
416416
(jupyter-repl-cell-beginning-position)
417417
'jupyter-cell))
418418
n)
419-
(jupyter-repl-cell-reset-prompt)))
419+
(when (string-match-p
420+
"In \\[[0-9]+\\]" (string-trim (jupyter-repl-prompt-string)))
421+
(jupyter-repl-cell-reset-prompt))))
420422

421423
(defun jupyter-repl-cell-count ()
422424
"Return the cell count of the cell at `point'."

0 commit comments

Comments
 (0)