diff options
author | L Lllvvuu <git@llllvvuu.dev> | 2023-09-16 01:08:06 -0700 |
---|---|---|
committer | L Lllvvuu <git@llllvvuu.dev> | 2023-09-16 04:56:12 -0700 |
commit | 34be915f6b9313d7554aa973a82277504de4e285 (patch) | |
tree | 3190ae838baef54a6fee58cdd94a03a53b826932 /runtime/lua/vim/shared.lua | |
parent | 40bfca744dd0c87df6ec2ab776f982636e4b0904 (diff) | |
download | rneovim-34be915f6b9313d7554aa973a82277504de4e285.tar.gz rneovim-34be915f6b9313d7554aa973a82277504de4e285.tar.bz2 rneovim-34be915f6b9313d7554aa973a82277504de4e285.zip |
fix(marktree): preserve ordering in `marktree_move`
`marktree_move` is making the tree out of order at:
https://github.com/neovim/neovim/blob/be10d65bfafe056025ffffa2c1131712b9a493a5/src/nvim/marktree.c#L1188
Because `key` is at the new position, and `x->key[new_i]` is also at the
new position, this comparison spuriously returns true, which causes
`x->key[i]` to be updated in-place even when it needs to be moved.
This causes crashes down the line, since the ordering of `MTNode.key` is
an invariant that must be preserved.
Fixes: #25157
Diffstat (limited to 'runtime/lua/vim/shared.lua')
0 files changed, 0 insertions, 0 deletions