Tree
- Tree:
5bbe3484123e065db6c54453c7db75ccdd823fa2- Date:
- Message:
- Fix restoration of original filename in Vim Vim has built-in autocmds for filename suffixes such as .bak, .old, and .new that remove the trailing suffix from the file name and run file type detection with the resulting filename. The s:ft_vim() function in this plugin's ftdetect script receives that filename as an argument. Prior to this change, it would attempt to rename the file to the given filename after finishing its filetype detection work. As a result, a file named "foo.j2.old" would be renamed to "foo.j2". This change fixes the behavior by renaming the file to the original buffer name rather than the filename passed to the function.
