Closed statiolake closed 2 years ago
You're right, either I have made a faulty assumption that we should always get an "UpdateCursor" call before we draw it or something fishy is up with that specific vimrc, in any case the extra check is good to have.
With newer version of Neovim, Nvy sometimes crashes on startup. More accurately, Nvy always crashes with one of my vimrc, but never crashes with my another vimrc. There seems to be something related to this issue in my configuration. However, the direct cause of this crash is that in that case
DrawCursor()
accesses to therenderer->cursor.mode_info
before it is set, resulting in NULL dereference. Checking that variable is non-NULL fixed the issue.I'm still not sure the exact factor causing this, maybe it is a bug on Neovim, but I think this is a harmless change, so I opened this PR.