aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/buffer.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2021-02-17 13:14:18 +0100
committerGitHub <noreply@github.com>2021-02-17 13:14:18 +0100
commitd623400cadea173fd6f146e4d3e27443166b6e57 (patch)
treeb1e6cbfb09b85ef9801d78079fbb3c467ccc06f5 /src/nvim/api/buffer.c
parent4bc74c24318a544f30a9d2431dbd969f9d5cd0f5 (diff)
parentd966e0142d5aee9389918e0d4005c0b3d56beadc (diff)
downloadrneovim-d623400cadea173fd6f146e4d3e27443166b6e57.tar.gz
rneovim-d623400cadea173fd6f146e4d3e27443166b6e57.tar.bz2
rneovim-d623400cadea173fd6f146e4d3e27443166b6e57.zip
Merge pull request #13944 from chentau/on_bytes_doc
Doc: update documentation for on_bytes
Diffstat (limited to 'src/nvim/api/buffer.c')
-rw-r--r--src/nvim/api/buffer.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c
index 0e97b36506..48eef20d59 100644
--- a/src/nvim/api/buffer.c
+++ b/src/nvim/api/buffer.c
@@ -111,6 +111,24 @@ Integer nvim_buf_line_count(Buffer buffer, Error *err)
/// - byte count of previous contents
/// - deleted_codepoints (if `utf_sizes` is true)
/// - deleted_codeunits (if `utf_sizes` is true)
+/// - on_bytes: lua callback invoked on change.
+/// This callback receives more granular information about the
+/// change compared to on_lines.
+/// Return `true` to detach.
+/// Args:
+/// - the string "bytes"
+/// - buffer handle
+/// - b:changedtick
+/// - start row of the changed text (zero-indexed)
+/// - start column of the changed text
+/// - byte offset of the changed text (from the start of
+/// the buffer)
+/// - old end row of the changed text
+/// - old end column of the changed text
+/// - old end byte length of the changed text
+/// - new end row of the changed text
+/// - new end column of the changed text
+/// - new end byte length of the changed text
/// - on_changedtick: Lua callback invoked on changedtick
/// increment without text change. Args:
/// - the string "changedtick"