Skip to content

Commit d7062b0

Browse files
author
Lars Andersen
committed
Fix cider-insert-in-repl not appending
Previously the input would just be dumped into the repl before wherever the user previously left point. Presumably the user always wants the input to appear at the end of the buffer where it can be (edited and) evaluated immediately.
1 parent b71049a commit d7062b0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cider-interaction.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1715,9 +1715,10 @@ If EVAL is non-nil the form will also be evaluated."
17151715
(while (string-match "\\`[ \t\n\r]+\\|[ \t\n\r]+\\'" form)
17161716
(setq form (replace-match "" t t form)))
17171717
(with-current-buffer (cider-current-repl-buffer)
1718-
(let ((start-pos (point)))
1718+
(goto-char (point-max))
1719+
(let ((beg (point)))
17191720
(insert form)
1720-
(indent-region start-pos (point)))
1721+
(indent-region beg (point)))
17211722
(when eval
17221723
(cider-repl-return)))
17231724
(cider-switch-to-repl-buffer))

0 commit comments

Comments
 (0)