Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions jupyter-org-client.el
Original file line number Diff line number Diff line change
Expand Up @@ -618,11 +618,11 @@ source block, return non-nil. Otherwise, when `point' is not
inside a Jupyter src-block, return nil."
(unless jupyter-org--src-block-cache
(setq jupyter-org--src-block-cache
(list (list 'invalid nil (make-marker)
(let ((end (make-marker)))
;; Move the end marker when text is inserted
(set-marker-insertion-type end t)
end)))))
(list 'invalid nil (make-marker)
(let ((end (make-marker)))
;; Move the end marker when text is inserted
(set-marker-insertion-type end t)
end))))
(if (org-in-src-block-p 'inside)
(or (jupyter-org--at-cached-src-block-p)
(when-let* ((el (org-element-at-point))
Expand Down
6 changes: 3 additions & 3 deletions test/jupyter-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -2170,10 +2170,10 @@ Image(filename='%s', width=300)" file)
(forward-line)
(end-of-line)
(should-not jupyter-org--src-block-cache)
(should-not (jupyter-org--same-src-block-p))
(jupyter-org--set-current-src-block)
(should-not (jupyter-org--at-cached-src-block-p))
(jupyter-org--set-src-block-cache)
(should jupyter-org--src-block-cache)
(should (jupyter-org--same-src-block-p))
(should (jupyter-org--at-cached-src-block-p))
(cl-destructuring-bind (params beg end)
jupyter-org--src-block-cache
(should (equal (alist-get :session params) jupyter-org-test-session))
Expand Down