mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 01:16:31 +00:00
shada: Fix jump/change list merging code
Errors happens under following conditions: 1. Jump/change list is full. 2. New jump/change list item should go between some of the old ones.
This commit is contained in:
@@ -1213,10 +1213,10 @@ static inline bool marks_equal(const pos_T a, const pos_T b)
|
||||
if (i > 0) { \
|
||||
if (jl_len == JUMPLISTSIZE) { \
|
||||
free_func(jumps[0]); \
|
||||
if (i == JUMPLISTSIZE) { \
|
||||
i = JUMPLISTSIZE - 1; \
|
||||
i--; \
|
||||
if (i > 0) { \
|
||||
memmove(&jumps[0], &jumps[1], sizeof(jumps[1]) * (size_t) i); \
|
||||
} \
|
||||
memmove(&jumps[0], &jumps[1], sizeof(jumps[1]) * (size_t) i); \
|
||||
} else if (i != jl_len) { \
|
||||
memmove(&jumps[i + 1], &jumps[i], \
|
||||
sizeof(jumps[0]) * (size_t) (jl_len - i)); \
|
||||
|
Reference in New Issue
Block a user