Remove rear-nonsticky property at cell beginning when finalizing a cell

This property is set when inserting new input prompts. It should be removed
when finalizing a cell otherwise it would be possible to insert more text at
the very beginning of a cell when it is finalized.
This commit is contained in:
Nathaniel Nicandro 2018-01-13 02:42:29 -06:00
parent 56a31cbbea
commit 00d50633c7

View file

@ -577,8 +577,9 @@ Finalizing a cell involves the following steps:
inserted
- Add the text property which marks the end of a cell
- Make the cell read-only"
(let* ((beg (jupyter-repl-cell-beginning-position))
(count (jupyter-repl-cell-count)))
(let ((beg (jupyter-repl-cell-beginning-position))
(count (jupyter-repl-cell-count)))
(remove-text-properties beg (1+ beg) '(rear-nonsticky))
(jupyter-repl-cell-mark-busy)
(goto-char (point-max))
(jupyter-repl-newline)