diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2026-08-23 19:32:07 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-23 19:32:07 -0400 |
| commit | eeefe7ca65dfe6d32d17d2dd438bd8139c3dfa47 (patch) | |
| tree | 3d08bf78aeca73f0007d4801fa41a83912b4cfee /runtime/syntax/python.vim | |
| parent | 716835c2325eee1e04e8c0694dbf61605cfa0eae (diff) | |
| download | rneovim-eeefe7ca65dfe6d32d17d2dd438bd8139c3dfa47.tar.gz rneovim-eeefe7ca65dfe6d32d17d2dd438bd8139c3dfa47.tar.bz2 rneovim-eeefe7ca65dfe6d32d17d2dd438bd8139c3dfa47.zip | |
fix(cwd): E812 when a message opens a window during a file read #41458
Problem:
When ui2 is enabled, opening an already-open file in another Neovim
instance results in the error `E812: Autocommands changed buffer…`.
Analysis:
On E812 the file is not loaded. The default SwapExists handler notifies
`W325: Ignoring swapfile…`, and ui2 shows that message by opening
a window, which is a temp context switch. `ctx_dirs_restore()`
re-shortens every buffer name on the way out, and `shorten_buf_fname()`
always frees and reallocates `b_sfname`. `readfile()` aliases `b_fname`
across `check_need_swap()` and compares the pointer to detect a rename.
Regression by b296666e419c, which replaced the `cs_save_sfname` restore
(that kept curbuf's pointer) with `shorten_fnames(true)`.
Solution:
Keep the allocation in `shorten_buf_fname()` when the short name is
unchanged. Pointer stability is what the E200/E201/E812 guards actually
assert.
Diffstat (limited to 'runtime/syntax/python.vim')
0 files changed, 0 insertions, 0 deletions