diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2014-07-17 12:06:31 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-07-17 12:06:31 -0300 |
commit | 953d61cbf82d5f1acd68bd1ae2101d92f5ec5492 (patch) | |
tree | d4aa1fe08ad3f0a7e27b6628aad4925cd1fbfb2a /src/nvim/api/buffer.c | |
parent | b92630c2fff7950141630f0d62b11404d0589ece (diff) | |
parent | 4dc642aa622cfac09f2f4752907137d68d8508fe (diff) | |
download | rneovim-953d61cbf82d5f1acd68bd1ae2101d92f5ec5492.tar.gz rneovim-953d61cbf82d5f1acd68bd1ae2101d92f5ec5492.tar.bz2 rneovim-953d61cbf82d5f1acd68bd1ae2101d92f5ec5492.zip |
Merge PR #895 'Core service providers...'
Diffstat (limited to 'src/nvim/api/buffer.c')
-rw-r--r-- | src/nvim/api/buffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c index 9c58baca39..21bfc5ede0 100644 --- a/src/nvim/api/buffer.c +++ b/src/nvim/api/buffer.c @@ -109,6 +109,7 @@ StringArray buffer_get_slice(Buffer buffer, } start = normalize_index(buf, start) + (include_start ? 0 : 1); + include_end = include_end || (end >= buf->b_ml.ml_line_count); end = normalize_index(buf, end) + (include_end ? 1 : 0); if (start >= end) { @@ -169,6 +170,7 @@ void buffer_set_slice(Buffer buffer, } start = normalize_index(buf, start) + (include_start ? 0 : 1); + include_end = include_end || (end >= buf->b_ml.ml_line_count); end = normalize_index(buf, end) + (include_end ? 1 : 0); if (start > end) { |