mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
buffer updates: fix issues with "change" operator
This commit is contained in:
parent
4cc2a7af4b
commit
b7fc7ac6a1
@ -1553,10 +1553,6 @@ int op_delete(oparg_T *oap)
|
||||
++curwin->w_cursor.lnum;
|
||||
del_lines(oap->line_count - 1, TRUE);
|
||||
curwin->w_cursor.lnum = lnum;
|
||||
|
||||
extmark_adjust(curbuf, curwin->w_cursor.lnum,
|
||||
curwin->w_cursor.lnum + oap->line_count - 1,
|
||||
MAXLNUM, 0, kExtmarkUndo);
|
||||
}
|
||||
if (u_save_cursor() == FAIL)
|
||||
return FAIL;
|
||||
@ -1571,7 +1567,7 @@ int op_delete(oparg_T *oap)
|
||||
truncate_line(FALSE); // delete the rest of the line
|
||||
|
||||
extmark_splice_cols(curbuf,
|
||||
(int)curwin->w_cursor.lnum, curwin->w_cursor.col,
|
||||
(int)curwin->w_cursor.lnum-1, curwin->w_cursor.col,
|
||||
old_len - curwin->w_cursor.col, 0, kExtmarkUndo);
|
||||
|
||||
// leave cursor past last char in line
|
||||
|
@ -427,7 +427,7 @@ describe('lua: nvim_buf_attach on_bytes', function()
|
||||
|
||||
feed "cc"
|
||||
check_events {
|
||||
{ "test1", "bytes", 1, 4, 1, 0, 1, 0, 15, 15, 0, 0, 0 };
|
||||
{ "test1", "bytes", 1, 4, 0, 0, 0, 0, 15, 15, 0, 0, 0 };
|
||||
}
|
||||
|
||||
feed "<ESC>"
|
||||
@ -436,7 +436,6 @@ describe('lua: nvim_buf_attach on_bytes', function()
|
||||
feed "c3j"
|
||||
check_events {
|
||||
{ "test1", "bytes", 1, 4, 1, 0, 1, 3, 0, 48, 0, 0, 0 };
|
||||
{ "test1", "bytes", 1, 5, 0, 0, 0, 4, 0, 0, 4, 0, 51 };
|
||||
}
|
||||
end)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user