aboutsummaryrefslogtreecommitdiff
path: root/src/api/buffer.c
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-05-10 22:37:36 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-05-13 14:11:26 -0300
commit607d4acfb262562b78145cbe3c2240fc7b4f49da (patch)
tree0a7b8e8fb363a5a5e7e1d59c61c181fd6d75b6b0 /src/api/buffer.c
parent8eb67404f00c789fc5e8ef723105be2b0aff85cd (diff)
downloadrneovim-607d4acfb262562b78145cbe3c2240fc7b4f49da.tar.gz
rneovim-607d4acfb262562b78145cbe3c2240fc7b4f49da.tar.bz2
rneovim-607d4acfb262562b78145cbe3c2240fc7b4f49da.zip
API: Implement functions for deleting lines
Diffstat (limited to 'src/api/buffer.c')
-rw-r--r--src/api/buffer.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/api/buffer.c b/src/api/buffer.c
index 309d5b5b27..bdd27fe347 100644
--- a/src/api/buffer.c
+++ b/src/api/buffer.c
@@ -67,6 +67,12 @@ void buffer_set_line(Buffer buffer, int64_t index, String line, Error *err)
buffer_set_slice(buffer, index, index, true, true, array, err);
}
+void buffer_del_line(Buffer buffer, int64_t index, Error *err)
+{
+ StringArray array = {.size = 0};
+ buffer_set_slice(buffer, index, index, true, true, array, err);
+}
+
StringArray buffer_get_slice(Buffer buffer,
int64_t start,
int64_t end,