Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tmp buf): Set tmp buf name to target file name
Set name of a tmp buffer to the chezmoi target file name before running the filetype detection because Neovim v0.10 has changed the builtin filetype detection behavior. It has used a buffer name instead of a matched path name in an autocmd callback of the builtin filetype detection since the change was applied on 2024-03-23. So calling only `:doau filetypedetect BufRead <VIRTUAL FIXED PATH> ...` is no longer working correcly and it needs to use `:file <VIRTUAL FIXED PATH>` for setting a buffer name to a virtual fixed path before `:doau ...`. Additionally, when using a command that creates or switches buffers, use `keepalt` command modifier for keeping the alternative buffer name. See the followings for more details of the related change: Issue link: neovim/neovim#27914 Commit No: 2955c921ceaf5764e8d1592a78370d9ca3a268e2
- Loading branch information