From f0e258cf8569b07153ed6beb1d31455e4de142f4 Mon Sep 17 00:00:00 2001 From: Thomas Vigouroux Date: Thu, 10 Sep 2020 18:52:56 +0200 Subject: fix(bytetrack): send correct events when opening lines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit a bit of test cleanup ärrår feeel SPLIT fix: sned correct updates on --- src/nvim/change.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/nvim') diff --git a/src/nvim/change.c b/src/nvim/change.c index 5e1ec616f6..b8bc08b747 100644 --- a/src/nvim/change.c +++ b/src/nvim/change.c @@ -1677,6 +1677,9 @@ int open_line( truncate_spaces(saved_line); } ml_replace(curwin->w_cursor.lnum, saved_line, false); + extmark_splice_cols( + curbuf, (int)curwin->w_cursor.lnum, + 0, curwin->w_cursor.col, (int)STRLEN(saved_line), kExtmarkUndo); saved_line = NULL; if (did_append) { changed_lines(curwin->w_cursor.lnum, curwin->w_cursor.col, -- cgit From a8f71676a199b6ffccedf7388d4104431144b158 Mon Sep 17 00:00:00 2001 From: Thomas Vigouroux Date: Fri, 11 Sep 2020 14:48:10 +0200 Subject: fix(bufupdates): avoid sending empty updates --- src/nvim/buffer_updates.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/nvim') diff --git a/src/nvim/buffer_updates.c b/src/nvim/buffer_updates.c index 79483380c9..4f56e5bf9e 100644 --- a/src/nvim/buffer_updates.c +++ b/src/nvim/buffer_updates.c @@ -288,7 +288,8 @@ void buf_updates_send_splice( int old_row, colnr_T old_col, bcount_t old_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; } -- cgit