diff options
author | Jaehwang Jung <tomtomjhj@gmail.com> | 2023-12-07 21:01:50 +0900 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2024-01-01 12:20:19 +0100 |
commit | 3faace199583f3a36470b717ce3e386e476f3a30 (patch) | |
tree | 1e183eb87b25eff3e9c79130a71930b48381011d | |
parent | 7cb29a572b365a5184defeec477271bd562b5076 (diff) | |
download | rneovim-3faace199583f3a36470b717ce3e386e476f3a30.tar.gz rneovim-3faace199583f3a36470b717ce3e386e476f3a30.tar.bz2 rneovim-3faace199583f3a36470b717ce3e386e476f3a30.zip |
docs: clarify on_bytes arguments
based on extmark_splice doc
-rw-r--r-- | runtime/doc/api.txt | 12 | ||||
-rw-r--r-- | runtime/lua/vim/_meta/api.lua | 12 | ||||
-rw-r--r-- | src/nvim/api/buffer.c | 6 |
3 files changed, 20 insertions, 10 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index b2581c8752..e3063b0591 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -2116,11 +2116,15 @@ nvim_buf_attach({buffer}, {send_buffer}, {*opts}) *nvim_buf_attach()* • 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 row of the changed text (offset from start + row) + • old end column of the changed text (if old end row + = 0, offset from start column) • old end byte length of the changed text - • new end row of the changed text - • new end column of the changed text + • new end row of the changed text (offset from start + row) + • new end column of the changed text (if new end row + = 0, offset from start column) • new end byte length of the changed text • on_changedtick: Lua callback invoked on changedtick diff --git a/runtime/lua/vim/_meta/api.lua b/runtime/lua/vim/_meta/api.lua index d94cef481e..c0dfa7635b 100644 --- a/runtime/lua/vim/_meta/api.lua +++ b/runtime/lua/vim/_meta/api.lua @@ -173,11 +173,15 @@ function vim.api.nvim_buf_add_highlight(buffer, ns_id, hl_group, line, col_start --- • 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 row of the changed text (offset from start +--- row) +--- • old end column of the changed text (if old end row +--- = 0, offset from start column) --- • old end byte length of the changed text ---- • new end row of the changed text ---- • new end column of the changed text +--- • new end row of the changed text (offset from start +--- row) +--- • new end column of the changed text (if new end row +--- = 0, offset from start column) --- • new end byte length of the changed text --- --- • on_changedtick: Lua callback invoked on changedtick diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c index bbb6b92986..3cb1512bb6 100644 --- a/src/nvim/api/buffer.c +++ b/src/nvim/api/buffer.c @@ -126,11 +126,13 @@ Integer nvim_buf_line_count(Buffer buffer, Error *err) /// - 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 row of the changed text (offset from start row) /// - old end column of the changed text +/// (if old end row = 0, offset from start column) /// - old end byte length of the changed text -/// - new end row of the changed text +/// - new end row of the changed text (offset from start row) /// - new end column of the changed text +/// (if new end row = 0, offset from start column) /// - new end byte length of the changed text /// - on_changedtick: Lua callback invoked on changedtick /// increment without text change. Args: |