mirror of
https://github.com/neovim/neovim.git
synced 2025-12-19 04:45:38 +00:00
fix(bufupdates): avoid sending empty updates
This commit is contained in:
@@ -288,7 +288,8 @@ void buf_updates_send_splice(
|
|||||||
int old_row, colnr_T old_col, bcount_t old_byte,
|
int old_row, colnr_T old_col, bcount_t old_byte,
|
||||||
int new_row, colnr_T new_col, bcount_t new_byte)
|
int new_row, colnr_T new_col, bcount_t new_byte)
|
||||||
{
|
{
|
||||||
if (!buf_updates_active(buf)) {
|
if (!buf_updates_active(buf)
|
||||||
|
|| (old_byte == 0 && new_byte == 0)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -338,7 +338,6 @@ describe('lua: nvim_buf_attach on_bytes', function()
|
|||||||
}
|
}
|
||||||
feed '<cr>'
|
feed '<cr>'
|
||||||
check_events {
|
check_events {
|
||||||
{ "test1", "bytes", 1, 4, 8, 0, 115, 0, 0, 0, 0, 0, 0 };
|
|
||||||
{ "test1", "bytes", 1, 5, 7, 0, 114, 0, 0, 0, 1, 0, 1 };
|
{ "test1", "bytes", 1, 5, 7, 0, 114, 0, 0, 0, 1, 0, 1 };
|
||||||
}
|
}
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user