aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Vigouroux <tomvig38@gmail.com>2021-05-20 20:05:25 +0200
committerGitHub <noreply@github.com>2021-05-20 20:05:25 +0200
commit3bd9cce3686f9bf0ed127be07d9812d8cb19bfd2 (patch)
treeb21e9d14e2e1fa25887e84abc2037dff6ffbd288 /src
parent5d9c5601275abfa17396b3a80c7b958c48080807 (diff)
parent237175cf20af5cac6d2e02560a65fd4590d2080c (diff)
downloadrneovim-3bd9cce3686f9bf0ed127be07d9812d8cb19bfd2.tar.gz
rneovim-3bd9cce3686f9bf0ed127be07d9812d8cb19bfd2.tar.bz2
rneovim-3bd9cce3686f9bf0ed127be07d9812d8cb19bfd2.zip
Merge pull request #14575 from vigoux/virtualedit-bytes
fix(bufupdate): send events when inserting with virtualedit
Diffstat (limited to 'src')
-rw-r--r--src/nvim/cursor.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/cursor.c b/src/nvim/cursor.c
index 74a6f77a6d..5d2210dc7d 100644
--- a/src/nvim/cursor.c
+++ b/src/nvim/cursor.c
@@ -14,6 +14,7 @@
#include "nvim/misc1.h"
#include "nvim/move.h"
#include "nvim/screen.h"
+#include "nvim/extmark.h"
#include "nvim/state.h"
#include "nvim/vim.h"
#include "nvim/ascii.h"
@@ -181,7 +182,7 @@ static int coladvance2(
memset(newline + idx, ' ', (size_t)correct);
ml_replace(pos->lnum, newline, false);
- changed_bytes(pos->lnum, (colnr_T)idx);
+ inserted_bytes(pos->lnum, (colnr_T)idx, 0, correct);
idx += correct;
col = wcol;
} else {
@@ -206,7 +207,7 @@ static int coladvance2(
memcpy(newline + idx + csize, line + idx + 1, n);
ml_replace(pos->lnum, newline, false);
- changed_bytes(pos->lnum, idx);
+ inserted_bytes(pos->lnum, idx, 1, csize);
idx += (csize - 1 + correct);
col += correct;
}