File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1467,7 +1467,8 @@ Return the created process."
1467
1467
(start-process " rustfmt-diff"
1468
1468
(with-current-buffer
1469
1469
(get-buffer-create " *rustfmt-diff*" )
1470
- (erase-buffer )
1470
+ (let ((inhibit-read-only t ))
1471
+ (erase-buffer ))
1471
1472
(current-buffer ))
1472
1473
rust-rustfmt-bin
1473
1474
" --check"
@@ -1478,7 +1479,10 @@ Return the created process."
1478
1479
(defun rust-format-diff-buffer-sentinel (process _e )
1479
1480
(when (eq 'exit (process-status process))
1480
1481
(if (> (process-exit-status process) 0 )
1481
- (display-buffer " *rustfmt-diff*" )
1482
+ (with-current-buffer " *rustfmt-diff*"
1483
+ (let ((inhibit-read-only t ))
1484
+ (diff-mode ))
1485
+ (pop-to-buffer (current-buffer )))
1482
1486
(message " rustfmt check passed. " ))))
1483
1487
1484
1488
(defun rust-format-buffer ()
You can’t perform that action at this time.
0 commit comments