diff options
author | chentau <tchen1998@gmail.com> | 2021-02-15 00:26:34 -0800 |
---|---|---|
committer | chentau <tchen1998@gmail.com> | 2021-02-17 00:47:19 -0800 |
commit | d966e0142d5aee9389918e0d4005c0b3d56beadc (patch) | |
tree | a07873fabff013c2effb3bfb03d9d5e4fc390cf6 /src | |
parent | dc3ca16a99ec05c88df1b1fe6a3cfbe97ea34227 (diff) | |
download | rneovim-d966e0142d5aee9389918e0d4005c0b3d56beadc.tar.gz rneovim-d966e0142d5aee9389918e0d4005c0b3d56beadc.tar.bz2 rneovim-d966e0142d5aee9389918e0d4005c0b3d56beadc.zip |
Doc: update documentation for on_bytes
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/api/buffer.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c index bd336a2b3d..43f9bdd25d 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" |