We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65b1f91 commit d98199eCopy full SHA for d98199e
blacken.el
@@ -102,8 +102,9 @@ Show black output, if black exit abnormally and DISPLAY is t."
102
(condition-case err
103
(if (not (zerop (blacken-call-bin original-buffer tmpbuf errbuf)))
104
(error "Black failed, see %s buffer for details" (buffer-name errbuf))
105
- (with-current-buffer tmpbuf
106
- (copy-to-buffer original-buffer (point-min) (point-max)))
+ (unless (eq (compare-buffer-substrings tmpbuf nil nil original-buffer nil nil) 0)
+ (with-current-buffer tmpbuf
107
+ (copy-to-buffer original-buffer (point-min) (point-max))))
108
(mapc 'kill-buffer (list tmpbuf errbuf))
109
(goto-char original-point)
110
(set-window-start (selected-window) original-window-pos))
0 commit comments