mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-05 07:41:37 -05:00
Take into account a narrowed buffer
This commit is contained in:
parent
14276c74f9
commit
c2c62329cb
1 changed files with 3 additions and 2 deletions
|
@ -248,7 +248,8 @@ Fixing the text properties of the current buffer involves
|
|||
substituting any `face' property with `font-lock-face' for
|
||||
insertion into the REPL buffer and adding
|
||||
`font-lock-extra-managed-props' to the text."
|
||||
(let ((pos (point-min)) next)
|
||||
(let ((start (point-min))
|
||||
(pos (point-min)) next)
|
||||
(catch 'done
|
||||
(while (setq next (or (next-property-change pos) (point-max)))
|
||||
;; Handle additional properties from font-lock, so as to
|
||||
|
@ -256,7 +257,7 @@ insertion into the REPL buffer and adding
|
|||
(dolist (prop (cons 'face font-lock-extra-managed-props))
|
||||
(let ((new-prop (get-text-property pos prop)))
|
||||
(put-text-property
|
||||
pos next
|
||||
(+ start (1- pos)) (1- (+ start next))
|
||||
(if (eq prop 'face) 'font-lock-face prop)
|
||||
(if (eq prop 'face) (or new-prop 'default)
|
||||
new-prop))))
|
||||
|
|
Loading…
Add table
Reference in a new issue