mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 19:25:11 -07:00
fix(vim.diff): fix fastforward off-by-1 (#20937)
This commit is contained in:
parent
234b8c5f3d
commit
95f2f3cb5e
@ -69,8 +69,8 @@ static void get_linematch_results(lua_State *lstate, mmfile_t *ma, mmfile_t *mb,
|
|||||||
const char *diff_begin[2] = { ma->ptr, mb->ptr };
|
const char *diff_begin[2] = { ma->ptr, mb->ptr };
|
||||||
int diff_length[2] = { (int)count_a, (int)count_b };
|
int diff_length[2] = { (int)count_a, (int)count_b };
|
||||||
|
|
||||||
fastforward_buf_to_lnum(&diff_begin[0], start_a);
|
fastforward_buf_to_lnum(&diff_begin[0], start_a + 1);
|
||||||
fastforward_buf_to_lnum(&diff_begin[1], start_b);
|
fastforward_buf_to_lnum(&diff_begin[1], start_b + 1);
|
||||||
|
|
||||||
int *decisions = NULL;
|
int *decisions = NULL;
|
||||||
size_t decisions_length = linematch_nbuffers(diff_begin, diff_length, 2, &decisions, iwhite);
|
size_t decisions_length = linematch_nbuffers(diff_begin, diff_length, 2, &decisions, iwhite);
|
||||||
|
Loading…
Reference in New Issue
Block a user