Hello, I found a bug in the master and emacs-27 versions of fit-window-to-buffer. Another window's data might be used to determine the new width. I'm attaching a patch which I believe fixes the issue. Justin