diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-07-15 18:23:11 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2019-08-06 17:01:47 +0200 |
commit | b0e26199ec02c9b392af6161522004c55db0441f (patch) | |
tree | c57e4cbd58018b8bf7e396239604b6e3e4943dfc /src/nvim/misc1.c | |
parent | 067a39ba854cc02a750911ead968a744b2769aac (diff) | |
download | rneovim-b0e26199ec02c9b392af6161522004c55db0441f.tar.gz rneovim-b0e26199ec02c9b392af6161522004c55db0441f.tar.bz2 rneovim-b0e26199ec02c9b392af6161522004c55db0441f.zip |
lua: add {old_byte_size} to on_lines buffer change event
Diffstat (limited to 'src/nvim/misc1.c')
-rw-r--r-- | src/nvim/misc1.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c index db0d56b5fd..112ca6f287 100644 --- a/src/nvim/misc1.c +++ b/src/nvim/misc1.c @@ -1685,6 +1685,7 @@ int del_bytes(colnr_T count, bool fixpos_arg, bool use_delcombine) bool was_alloced = ml_line_alloced(); // check if oldp was allocated char_u *newp; if (was_alloced) { + curbuf->deleted_bytes += (size_t)oldlen+1; newp = oldp; // use same allocated memory } else { // need to allocate a new line newp = xmalloc((size_t)(oldlen + 1 - count)); |