mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-06 09:31:39 -05:00
Fix the problem with autoexec and insert
The problem was that ein:cell-input-pos-min/max fail when called
during the insertion, because the input area does not exist yet
when inserting, for example prompt EWOC node. This is fixed in
the previous commit 0205188933
.
They return nil when there is no input area yet. So,
ein:autoexec-after-change checks if they return nil or not now.
This commit is contained in:
parent
0205188933
commit
91af6700ce
1 changed files with 2 additions and 2 deletions
|
@ -49,8 +49,8 @@ If the previous execution timer is not fired yet, cancel the timer."
|
|||
(let ((cell (ein:notebook-get-current-cell beg)))
|
||||
(when (and (ein:codecell-p cell)
|
||||
this-command
|
||||
(<= (ein:cell-input-pos-min cell) beg)
|
||||
(>= (ein:cell-input-pos-max cell) end))
|
||||
(ein:aif (ein:cell-input-pos-min cell) (<= it beg))
|
||||
(ein:aif (ein:cell-input-pos-max cell) (>= it end)))
|
||||
(ein:autoexec-execute-cell cell))))
|
||||
|
||||
(define-minor-mode ein:autoexec-mode
|
||||
|
|
Loading…
Add table
Reference in a new issue