From 1d1963e90e53e0a9f0eeb38d39f88fd7e78fa11e Mon Sep 17 00:00:00 2001 From: Enrico Ghirardi Date: Tue, 8 Sep 2015 20:31:34 +0200 Subject: 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 --- src/nvim/api/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 -- cgit