Start Vim:
vim --clean
Then run:
:filetype plugin on :setglobal colorcolumn= :set filetype=fixture :setlocal colorcolumn=73 :let b:undo_ftplugin = 'setlocal colorcolumn<' :split :set filetype=text :windo echo win_getid() (empty(&l:colorcolumn) ? '<empty>' : &l:colorcolumn) :messages
The current window has an empty colorcolumn, but the other window still has colorcolumn=73:
1001 <empty>
1000 73
Both windows should stop showing the filetype-specific color column when their shared buffer changes filetype. Generally, :help undo_ftplugin says that "the effect of the previous filetype should be undone" - and this isn't really true.
Obviously, we know that a buffer-scoped undo hook cannot fully undo window-local effects when the buffer is displayed in multiple windows. Just wanted to canonicalize this issue here as I found it today.
Note that this is distinct from #17113.
9.1.1752
macOS arm64 + nix
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()