In February 2021, the Neovim project merged pull request #13973, titled 'Save extmark undo information when writing to undofile.' The change, authored by contributor chentoast and reviewed by bfredl, modified how Neovim serializes runtime state to persistent undo files (undofiles). Prior to this merge, Neovim did not attempt to preserve certain categories of undo data when writing the undofile format. The PR was intended to address issue #13048, which concerned memory leaks detected by Leak Sanitizer when using Treesitter, but its side effect was a fundamental change to undofile compatibility across editor versions.

Neovim pull request 13973 GitHub page preview
Neovim pull request 13973 GitHub page previewgithub.com

This image shows the GitHub pull request #13973 that the article discusses, which changed how Neovim serializes persistent undo files.

The mechanical consequence is that newer versions of Neovim will not read undofiles written by previous versions, and will actively delete undofiles containing unrecognized format data. As documented in the PR thread, when a user configures the same undodir path for both Neovim and Vim, Neovim's updated undofile format overwrites and replaces the Vim persistent undo file. Vim requires an explicit path to enable persistent undo—there is no shared default path—so the collision occurs only when a user directs both editors to the same directory. The result is that Vim users upgrading to the new Neovim version lose their persistent undo history, as the undofile is discarded during the format transition. Project lead bfredl acknowledged the break before merge, noting 'I don't see a way for this change to not break previous undofiles' and agreeing to communicate with master-followers so the change does not come as a surprise.

The broader significance is that the maintainers were aware of this compatibility break before the change was merged. Commenter akinsho confirmed the expected behavior: 'since this format of the undofile has changed, any undofiles before this pr will be outdated and won't work.' For users who share undo directories between editors, this represents a material data-loss risk with no automatic recovery path. The primary source does not establish whether a backwards-compatible alternative was considered or rejected, nor does it quantify how many users are affected—those details depend on individual configuration choices. What is clear is that the change, merged without explicit warning to users who might share undodir paths, creates a concrete risk of lost undo history for Vim users who adopt the new Neovim.