aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/api.txt
diff options
context:
space:
mode:
authorMarco Hinz <mh.codebro@gmail.com>2019-11-10 16:38:04 +0100
committerGitHub <noreply@github.com>2019-11-10 16:38:04 +0100
commit1cb4674547828a315b7aef5b6c635726b3bc12e5 (patch)
tree5207a5ed951a5820f18019b9ad0acbebc7b9d83d /runtime/doc/api.txt
parent3a075ce3dc97926f5aabc027b77a80c26c65de61 (diff)
downloadrneovim-1cb4674547828a315b7aef5b6c635726b3bc12e5.tar.gz
rneovim-1cb4674547828a315b7aef5b6c635726b3bc12e5.tar.bz2
rneovim-1cb4674547828a315b7aef5b6c635726b3bc12e5.zip
api: add nvim_buf_get_virtual_text() (#11354)
This adds the missing partner function of nvim_buf_set_virtual_text().
Diffstat (limited to 'runtime/doc/api.txt')
-rw-r--r--runtime/doc/api.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index d6e420c427..93440f307c 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -1842,6 +1842,27 @@ nvim_buf_set_virtual_text({buffer}, {ns_id}, {line}, {chunks}, {opts})
Return: ~
The ns_id that was used
+nvim_buf_get_virtual_text({buffer}, {lnum}) *nvim_buf_get_virtual_text()*
+ Get the virtual text (annotation) for a buffer line.
+
+ The virtual text is returned as list of lists, whereas the
+ inner lists have either one or two elements. The first element
+ is the actual text, the optional second element is the
+ highlight group.
+
+ The format is exactly the same as given to
+ nvim_buf_set_virtual_text().
+
+ If there is no virtual text associated with the given line, an
+ empty list is returned.
+
+ Parameters: ~
+ {buffer} Buffer handle, or 0 for current buffer
+ {line} Line to get the virtual text from (zero-indexed)
+
+ Return: ~
+ List of virtual text chunks
+
nvim__buf_stats({buffer}) *nvim__buf_stats()*
TODO: Documentation