diff options
| author | Johannes Altmanninger <aclopte@gmail.com> | 2024-12-13 08:24:22 +0100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2025-06-26 11:34:17 +1000 |
| commit | cff5f12a852a34a548aabfb6166c86fa35466a83 (patch) | |
| tree | 99ab74642a06182f74db10305512b227d3625429 /test/normal | |
| parent | 096d72bbb11e3a2ec227de9eda4dfac02ed970aa (diff) | |
Fix flaky blame-in-diff test and "edit -fifo" in BufCloseFifo
This test uses ui_out and ui_in to coordinate events.
This is brittle[1] because ui_out behavior depends on timing.
Since this test doesn't really care about intermediate UI state,
express the sequence using BufCloseFifo instead.
This hits another issue: inside git blame-jump's BufCloseFifo, we
run git blame, which runs another "edit -fifo .. *git*". A special
aspect of fifo buffers is that any existing *git* buffer will be
reused instead of being recreated[2]. After BufCloseFifo, the fifo
watcher destructor will reset the fifo flag, even if BufCloseFifo
has recreated the fifo buffer. This breaks invariants and causes
the next fifo watcher destructor do fail its assertion.
Let's not reset fifo flags in this case. This should be safe because
it's the very last thing the fifo watcher does, so it's okay if
another one is active now.
Alternatively we could reject this kind of recursion, or implement
it in a different way (using ScopedSetBool for the flags).
Reported-by: Nico Sonack <nsonack@herrhotzenplotz.de>
[1]: https://lists.sr.ht/~mawww/kakoune/%3C20241210100417.1150697-1-aclopte@gmail.com%3E
[2]: This removes the need to use delete-buffer which also ensures that
the buffer remains visible in any client it's already shown.
Diffstat (limited to 'test/normal')
0 files changed, 0 insertions, 0 deletions
