Skip to content

Commit

Permalink
Merge pull request #503 from ohad/dirty-buffer-on-load-move-line
Browse files Browse the repository at this point in the history
Bug-fix issue #402: flag buffer dirty on load-file to line and forward/backward-line
  • Loading branch information
jfdm authored May 22, 2020
2 parents acc8835 + 6f52660 commit 96707ba
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions idris-commands.el
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@
(save-excursion
(goto-char idris-load-to-here)
(forward-line nlines)
(idris-make-dirty)
(idris-load-to (point)))))

(defun idris-load-backward-line ()
Expand All @@ -176,12 +177,13 @@

(defun idris-load-file (&optional set-line)
"Pass the current buffer's file to the inferior Idris process.
A prefix argument restricts loading to the current
line."
A prefix argument forces loading but only up to the current line."
(interactive "p")
(save-buffer)
(idris-ensure-process-and-repl-buffer)
(when (and set-line (= set-line 4)) (idris-load-to (point)))
(when (and set-line (= set-line 4))
(idris-load-to (point))
(idris-make-dirty))
(when (and set-line (= set-line 16)) (idris-no-load-to))
(if (buffer-file-name)
(when (idris-current-buffer-dirty-p)
Expand Down

0 comments on commit 96707ba

Please sign in to comment.