Skip to content

Commit a33e2c1

Browse files
author
Zhitao Gong
authored
Reuse *yapify* buffer (#29)
1 parent 3df4e8c commit a33e2c1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

yapfify.el

+2-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ If yapf exits with an error, the output will be shown in a help-window."
7575
(= (char-before end) 13))
7676
(- end 1)
7777
end)))
78-
(tmpbuf (generate-new-buffer "*yapfify*"))
78+
(tmpbuf (get-buffer-create "*yapfify*"))
79+
(dummy (with-current-buffer tmpbuf (erase-buffer)))
7980
(exit-code (yapfify-call-bin original-buffer tmpbuf start-line end-line)))
8081
(deactivate-mark)
8182
;; There are three exit-codes defined for YAPF:

0 commit comments

Comments
 (0)