diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2020-02-29 15:27:17 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2020-09-09 21:22:21 +0200 |
commit | bc86f76c0a1d3234b749a105c9aae65f84c51320 (patch) | |
tree | c8930079e178c2a3233ef43602f7136d3f6981fb /src/nvim/indent.c | |
parent | 81fa107f595ee0392b5f004b86e4e8d41e49cc9e (diff) | |
download | rneovim-bc86f76c0a1d3234b749a105c9aae65f84c51320.tar.gz rneovim-bc86f76c0a1d3234b749a105c9aae65f84c51320.tar.bz2 rneovim-bc86f76c0a1d3234b749a105c9aae65f84c51320.zip |
api/buffer: add "on_bytes" callback to nvim_buf_attach
This implements byte-resolution updates of buffer changes.
Note: there is no promise that the buffer state is valid inside
the callback!
Diffstat (limited to 'src/nvim/indent.c')
-rw-r--r-- | src/nvim/indent.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/indent.c b/src/nvim/indent.c index fb277b25fd..25a9b38b5d 100644 --- a/src/nvim/indent.c +++ b/src/nvim/indent.c @@ -297,10 +297,9 @@ int set_indent(int size, int flags) if (!(flags & SIN_UNDO) || (u_savesub(curwin->w_cursor.lnum) == OK)) { ml_replace(curwin->w_cursor.lnum, newline, false); if (!(flags & SIN_NOMARK)) { - extmark_splice(curbuf, + extmark_splice_cols(curbuf, (int)curwin->w_cursor.lnum-1, skipcols, - 0, (int)(p-oldline) - skipcols, - 0, (int)(s-newline) - skipcols, + (int)(p-oldline) - skipcols, (int)(s-newline) - skipcols, kExtmarkUndo); } |