Skip to content

Commit

Permalink
Close the rustfmt popup if it passed
Browse files Browse the repository at this point in the history
Closes #33
  • Loading branch information
CeleritasCelery committed Aug 17, 2024
1 parent 97ae8a6 commit 65137a2
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 65137a2

Please sign in to comment.