aboutsummaryrefslogtreecommitdiff
path: root/src/nvim
diff options
context:
space:
mode:
authorKillTheMule <KillTheMule@users.noreply.github.com>2018-01-27 14:49:16 +0100
committerKillTheMule <KillTheMule@users.noreply.github.com>2018-05-23 22:07:27 +0200
commit0476e0aef3a82879961acd515b8587fc1b941597 (patch)
tree2d0158602c371ffaa8314f1359a6c1d036043099 /src/nvim
parent37b8e95fd69ba4991454f79802bfe1bccf7c827a (diff)
downloadrneovim-0476e0aef3a82879961acd515b8587fc1b941597.tar.gz
rneovim-0476e0aef3a82879961acd515b8587fc1b941597.tar.bz2
rneovim-0476e0aef3a82879961acd515b8587fc1b941597.zip
Make LiveUpdate return lastline instead of numreplaced
In analogy to `nvim_buf_set_lines`.
Diffstat (limited to 'src/nvim')
-rw-r--r--src/nvim/liveupdate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/liveupdate.c b/src/nvim/liveupdate.c
index 9679d72569..6bff75217b 100644
--- a/src/nvim/liveupdate.c
+++ b/src/nvim/liveupdate.c
@@ -137,8 +137,8 @@ void liveupdate_send_changes(buf_T *buf, linenr_T firstline, int64_t num_added,
// the first line that changed (zero-indexed)
args.items[2] = INTEGER_OBJ(firstline - 1);
- // how many lines are being swapped out
- args.items[3] = INTEGER_OBJ(num_removed);
+ // the last line that was changed
+ args.items[3] = INTEGER_OBJ(firstline - 1 + num_removed);
// linedata of lines being swapped in
Array linedata = ARRAY_DICT_INIT;