aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/api.txt
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2024-01-19 10:49:13 +0100
committerGitHub <noreply@github.com>2024-01-19 10:49:13 +0100
commit0b36cbbafd99e60844faafea026a89a3355a4ac4 (patch)
tree84f2f2e1c1abe2e5b70e111d65faa057ac1d9f18 /runtime/doc/api.txt
parent96d0f4a2d71662032b3a17224a0a9ef0a1861d6a (diff)
parent18334a4a0cd9e5130237fc42dcd79d0a7d8e7d73 (diff)
downloadrneovim-0b36cbbafd99e60844faafea026a89a3355a4ac4.tar.gz
rneovim-0b36cbbafd99e60844faafea026a89a3355a4ac4.tar.bz2
rneovim-0b36cbbafd99e60844faafea026a89a3355a4ac4.zip
Merge pull request #27061 from luukvbaal/extmark
fix(extmarks): do not remove invalid marks from decor upon deletion
Diffstat (limited to 'runtime/doc/api.txt')
-rw-r--r--runtime/doc/api.txt12
1 files changed, 9 insertions, 3 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index b5a49f6002..f37d349fd8 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -2594,8 +2594,8 @@ nvim_buf_get_extmark_by_id({buffer}, {ns_id}, {id}, {*opts})
*nvim_buf_get_extmarks()*
nvim_buf_get_extmarks({buffer}, {ns_id}, {start}, {end}, {*opts})
- Gets |extmarks| (including |signs|) in "traversal order" from a |charwise|
- region defined by buffer positions (inclusive, 0-indexed |api-indexing|).
+ Gets |extmarks| in "traversal order" from a |charwise| region defined by
+ buffer positions (inclusive, 0-indexed |api-indexing|).
Region can be given as (row,col) tuples, or valid extmark ids (whose
positions define the bounds). 0 and -1 are understood as (0,0) and (-1,-1)
@@ -2611,6 +2611,10 @@ nvim_buf_get_extmarks({buffer}, {ns_id}, {start}, {end}, {*opts})
the `overlap` option might be useful. Otherwise only the start position of
an extmark will be considered.
+ Note: legacy signs placed through the |:sign| commands are implemented as
+ extmarks and will show up here. Their details array will contain a
+ `sign_name` field.
+
Example: >lua
local api = vim.api
local pos = api.nvim_win_get_cursor(0)
@@ -2742,7 +2746,9 @@ nvim_buf_set_extmark({buffer}, {ns_id}, {line}, {col}, {*opts})
text around the mark was deleted and then restored by
undo. Defaults to true.
• invalidate : boolean that indicates whether to hide the
- extmark if the entirety of its range is deleted. If
+ extmark if the entirety of its range is deleted. For
+ hidden marks, an "invalid" key is added to the "details"
+ array of |nvim_buf_get_extmarks()| and family. If
"undo_restore" is false, the extmark is deleted instead.
• priority: a priority value for the highlight group or sign
attribute. For example treesitter highlighting uses a