fix(buffers): assertion failed when buflist is nil - #2754
Conversation
Problem: `contents` callback calls `utils.CTX()` without `includeBuflist`,
so if the context was recreated between `core.lua:346` (which passes
`includeBuflist=true`) and the async `contents` invocation, `buflist` is
nil and the assertion crashes. The same file already handles this at
`line 282` with `utils.CTX().buflist or {}`.
Solution: pass `{ includeBuflist = true }` explicitly, ensuring the ctx
always has `buflist` populated when accessed inside the callback.
Closes #2736
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughIn ChangesBuflist context retrieval fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
So you found it :) |
|
no, it's still a llm slop, I don't understand the real reason. Give llm more time to persuude me... |
|
Fun fact I never reproduce since then.. |

Problem:
contentscallback callsutils.CTX()withoutincludeBuflist,so if the context was recreated between
core.lua:346(which passesincludeBuflist=true) and the asynccontentsinvocation,buflistisnil and the assertion crashes. The same file already handles this at
line 282withutils.CTX().buflist or {}.Solution: pass
{ includeBuflist = true }explicitly, ensuring the ctxalways has
buflistpopulated when accessed inside the callback.Closes #2736
Summary by CodeRabbit
Release Notes
No user-visible changes in this update. Internal implementation adjustments have been made to improve code reliability.