diff options
author | Enrico Ghirardi <i@choco.me> | 2015-09-08 20:31:34 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-09-09 00:35:52 -0400 |
commit | 1d1963e90e53e0a9f0eeb38d39f88fd7e78fa11e (patch) | |
tree | db5b4c05ae43568c5e447857b2427a0c9a1c76c7 /src/nvim/api/buffer.c | |
parent | 3736a613e8ccbb4ed38f24399e9a368112216d69 (diff) | |
download | rneovim-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.c | 2 |
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 |