Skip to content

Commit

Permalink
Merge pull request #35 from emacs-rustic/format-on-save
Browse files Browse the repository at this point in the history
Close the rustfmt popup if it passed
  • Loading branch information
CeleritasCelery authored Aug 17, 2024
2 parents 0007e87 + 65137a2 commit 2721157
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions rustic-rustfmt.el
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,12 @@ and it's `cdr' is a list of arguments."
(let ((proc-buffer (process-buffer proc)))
(with-current-buffer proc-buffer
(if (string-match-p "^finished" output)
(and
(with-current-buffer next-error-last-buffer
(revert-buffer t t t))
(kill-buffer proc-buffer))
(progn
(with-current-buffer next-error-last-buffer
(revert-buffer t t t))
(-if-let (win (get-buffer-window proc-buffer))
(quit-window t win)
(kill-buffer proc-buffer)))
(sit-for 0.1)
(with-current-buffer next-error-last-buffer
(goto-char rustic-save-pos))
Expand Down

0 comments on commit 2721157

Please sign in to comment.