From 2a602246deca3289be8ae7aad829e802bd21be26 Mon Sep 17 00:00:00 2001 From: Nathaniel Nicandro Date: Tue, 6 Feb 2018 17:45:12 -0600 Subject: [PATCH] Revert back to correct behavior --- jupyter-repl-client.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/jupyter-repl-client.el b/jupyter-repl-client.el index bb303d2..a25e98c 100644 --- a/jupyter-repl-client.el +++ b/jupyter-repl-client.el @@ -716,12 +716,13 @@ POS defaults to `point'." (defun jupyter-repl-cell-line-p () "Is the current line a cell input line?" - (save-excursion - (unless (= (point) (jupyter-repl-cell-beginning-position)) - (jupyter-repl-previous-cell)) - (<= (jupyter-repl-cell-code-beginning-position) - (point) - (jupyter-repl-cell-code-end-position)))) + (let ((pos (point))) + (save-excursion + (unless (= pos (jupyter-repl-cell-beginning-position)) + (jupyter-repl-previous-cell)) + (<= (jupyter-repl-cell-code-beginning-position) + pos + (jupyter-repl-cell-code-end-position))))) (defun jupyter-repl-cell-finalized-p () "Has the current cell been finalized?