skuro / plantuml-mode

A major mode for editing PlantUML sources in Emacs
GNU General Public License v3.0
511 stars 96 forks source link

Reuse the old preview buffer/window such that display-buffer behaves #160

Open bram85 opened 2 years ago

bram85 commented 2 years ago

Before, the buffer is killed and then recreated. This causes wrong behavior for display-buffer when display-buffer-reuse-window and display-buffer-same-window is used: the first one fails so the same window is used where the diagram source is situated.

Instead, reuse the buffer and its window, so don't kill the buffer, erase it instead.