Unbreak Flymake's diagnostics buffer when revisiting source

Fixes: bug#33881
Copyright-paperwork-exempt: yes

* lisp/progmodes/flymake.el (flymake-show-diagnostics-buffer):
Set flymake--diagnostics-buffer-source before reverting.
This commit is contained in:
John Shahid 2019-01-04 21:28:35 +00:00 committed by João Távora
parent 821a0840b2
commit 16e2554880

View file

@ -1332,9 +1332,9 @@ POS can be a buffer position or a button"
(target (or (get-buffer name)
(with-current-buffer (get-buffer-create name)
(flymake-diagnostics-buffer-mode)
(setq flymake--diagnostics-buffer-source source)
(current-buffer)))))
(with-current-buffer target
(setq flymake--diagnostics-buffer-source source)
(revert-buffer)
(display-buffer (current-buffer)))))