Trevor Arjeski writes: > Using a few new emacs 31 window configurations, upon creating a new erc > query buffer with `/query yournick`, hitting RET or sending a message > makes the window the sole window in the frame as if C-x 1 was entered. > > Minimal reproduction: > > (use-package window > :custom > (kill-buffer-quit-windows t) > (quit-restore-window-no-switch 'skip-first)) > > 1. Start erc > 2. Open a query from the server buffer with `/query trev` > 3. Hit enter > 4. Notice that the query buffer that was created as a split becomes the > only window in the frame. > > This seems to trigger in `erc--split-line` in erc-backend.el, where a > temp buffer is created and then subsequently killed. Thanks for investigating. Does the attached patch improve the situation?