Don't add the font-lock-multiline property to finalized cell text

The boundaries of cell text are already considered by
`jupyter-repl-map-cells` (called during fontification) so there is no
need to, in addition, have the `font-lock-multiline` property (see the
documentation of `font-lock-extend-region-functions` for what that
property is meant to do).

With regards to the comment, since the buffer is narrowed to the cell
text during fontification, syntactic fontification is contained within
the cell.
This commit is contained in:
Nathaniel Nicandro 2021-01-16 17:18:54 -06:00
parent 6ce8d01e3a
commit b546724392

View file

@ -739,9 +739,7 @@ Place `point' at `point-max'."
;; cell or after any continuation prompts. See
;; `jupyter-repl-insert-prompt'.
(remove-text-properties beg (point) '(rear-nonsticky))
;; font-lock-multiline to avoid improper syntactic elements from
;; spilling over to the rest of the buffer.
(add-text-properties beg (point) '(read-only t font-lock-multiline t))
(add-text-properties beg (point) '(read-only t))
;; reset the undo list so that a completed cell doesn't get undone.
(setq buffer-undo-list '((t . 0)))))