diff options
author | Gregory Anders <8965202+gpanders@users.noreply.github.com> | 2023-11-14 17:02:57 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-14 17:02:57 -0600 |
commit | ba58c6f8a44c9c37e97fce1d802dc5b5defceb3d (patch) | |
tree | d8692391000b997bad511f5391e4dc727fc3ad9a /runtime/lua/vim/_meta/api.lua | |
parent | c37f7bdba5069eb989c3374c660b540e7539f874 (diff) | |
download | rneovim-ba58c6f8a44c9c37e97fce1d802dc5b5defceb3d.tar.gz rneovim-ba58c6f8a44c9c37e97fce1d802dc5b5defceb3d.tar.bz2 rneovim-ba58c6f8a44c9c37e97fce1d802dc5b5defceb3d.zip |
fix: only attempt to close timer if not already closing (#26047)
This fixes an error that can occur in certain pathological cases when
the autocommand fires at just the right time such that it attempts to
close the timer after the timer has already exited, but before the
scheduled callback has fired.
We now let the timer continue to run even when the autocommand deletes
itself to avoid having to repeat the cleanup code multiple times. There
is no harm in letting the timer execute if the autocommand does not
exist, as the pcall will catch the error.
Diffstat (limited to 'runtime/lua/vim/_meta/api.lua')
0 files changed, 0 insertions, 0 deletions