mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-06 01:21:38 -05:00
Add optional RELPOS argument to ein:cell-goto
This commit is contained in:
parent
34a10d38b5
commit
3934f8471a
1 changed files with 6 additions and 3 deletions
|
@ -594,10 +594,13 @@ Called from ewoc pretty printer via `ein:cell-pp'."
|
|||
(message (ein:trim (ansi-color-apply defstring))))))
|
||||
(ein:log 'info "no info for %s" name))))
|
||||
|
||||
(defmethod ein:cell-goto ((cell ein:basecell))
|
||||
(defmethod ein:cell-goto ((cell ein:basecell) &optional relpos)
|
||||
"Go to the input area of the given CELL.
|
||||
RELPOS is the position relative to the input area. Default is 0."
|
||||
(unless relpos (setq relpos 0))
|
||||
(ewoc-goto-node (oref cell :ewoc) (ein:cell-element-get cell :input))
|
||||
;; Skip the newline
|
||||
(forward-char))
|
||||
;; `1+' to skip the newline
|
||||
(forward-char (1+ relpos)))
|
||||
|
||||
(defmethod ein:cell-relative-point ((cell ein:basecell) &optional pos)
|
||||
"Return the point relative to the input area of CELL.
|
||||
|
|
Loading…
Add table
Reference in a new issue