diff options
author | Magnus Groß <magnus.gross@rwth-aachen.de> | 2021-11-17 17:55:49 +0100 |
---|---|---|
committer | Magnus Groß <magnus.gross@rwth-aachen.de> | 2021-11-18 14:23:33 +0100 |
commit | 1fb101afe4f28ada83721c4ac260de46d23504ee (patch) | |
tree | a4aa3a2f24cd51f6b53fea0b15400bce0bf06f7f /src/nvim/buffer_defs.h | |
parent | fdfd1eda434b70b02b4cb804546c97ef8ff09049 (diff) | |
download | rneovim-1fb101afe4f28ada83721c4ac260de46d23504ee.tar.gz rneovim-1fb101afe4f28ada83721c4ac260de46d23504ee.tar.bz2 rneovim-1fb101afe4f28ada83721c4ac260de46d23504ee.zip |
vim-patch:8.2.3609: internal error when ModeChanged is triggered recursively
Problem: Internal error when ModeChanged is triggered when v:event is
already in use.
Solution: Save and restore v:event if needed.
https://github.com/vim/vim/commit/3075a45592fe76f2febb6321632a23e352efe949
In the vim codebase there is no occurrence of get_vim_var_dict(VV_EVENT)
after the above patch, so in order to hold the same invariant in the
neovim codebase we needed to replace more occurrences than the related
vim patch.
Diffstat (limited to 'src/nvim/buffer_defs.h')
-rw-r--r-- | src/nvim/buffer_defs.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/buffer_defs.h b/src/nvim/buffer_defs.h index bd9c5efa44..3d7b03d921 100644 --- a/src/nvim/buffer_defs.h +++ b/src/nvim/buffer_defs.h @@ -1116,6 +1116,12 @@ typedef struct { pos_T w_cursor_corr; // corrected cursor position } pos_save_T; +// Struct passed to get_v_event() and restore_v_event(). +typedef struct { + bool sve_did_save; + hashtab_T sve_hashtab; +} save_v_event_T; + /// Indices into vimmenu_T->strings[] and vimmenu_T->noremap[] for each mode /// \addtogroup MENU_INDEX /// @{ |