aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/buffer.c
diff options
context:
space:
mode:
authorEnrico Ghirardi <i@choco.me>2015-09-08 20:31:34 +0200
committerJustin M. Keyes <justinkz@gmail.com>2015-09-09 00:35:52 -0400
commit1d1963e90e53e0a9f0eeb38d39f88fd7e78fa11e (patch)
treedb5b4c05ae43568c5e447857b2427a0c9a1c76c7 /src/nvim/api/buffer.c
parent3736a613e8ccbb4ed38f24399e9a368112216d69 (diff)
downloadrneovim-1d1963e90e53e0a9f0eeb38d39f88fd7e78fa11e.tar.gz
rneovim-1d1963e90e53e0a9f0eeb38d39f88fd7e78fa11e.tar.bz2
rneovim-1d1963e90e53e0a9f0eeb38d39f88fd7e78fa11e.zip
api: buffer_insert: fix bounds. #3315
buffer_insert calls buffer_set_line_slice excluding the start line number and including the end, but it should be the opposite. Closes https://github.com/neovim/neovim/issues/3212 Closes https://github.com/neovim/python-client/issues/103
Diffstat (limited to 'src/nvim/api/buffer.c')
-rw-r--r--src/nvim/api/buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c
index 12c97cfffb..ce3e64def8 100644
--- a/src/nvim/api/buffer.c
+++ b/src/nvim/api/buffer.c
@@ -467,7 +467,7 @@ void buffer_insert(Buffer buffer,
ArrayOf(String) lines,
Error *err)
{
- buffer_set_line_slice(buffer, lnum, lnum, false, true, lines, err);
+ buffer_set_line_slice(buffer, lnum, lnum, true, false, lines, err);
}
/// Return a tuple (row,col) representing the position of the named mark