diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-10-23 23:10:35 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-11-06 01:56:04 +0100 |
commit | 73fabf4f150e1f4e2da523b6c60b8b90797df4d2 (patch) | |
tree | 3927e6b0215226ecc3207ddb8ccecfde4c48428b /src/nvim/api/buffer.c | |
parent | 842a54a1bbdd3724ba9283269b3f9899b3844e35 (diff) | |
download | rneovim-73fabf4f150e1f4e2da523b6c60b8b90797df4d2.tar.gz rneovim-73fabf4f150e1f4e2da523b6c60b8b90797df4d2.tar.bz2 rneovim-73fabf4f150e1f4e2da523b6c60b8b90797df4d2.zip |
doc: nvim_buf_add_highlight(): zero-indexed lines
Diffstat (limited to 'src/nvim/api/buffer.c')
-rw-r--r-- | src/nvim/api/buffer.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c index c381e92dc7..f592f44f0e 100644 --- a/src/nvim/api/buffer.c +++ b/src/nvim/api/buffer.c @@ -739,29 +739,29 @@ ArrayOf(Integer, 2) nvim_buf_get_mark(Buffer buffer, String name, Error *err) /// Adds a highlight to buffer. /// -/// This can be used for plugins which dynamically generate highlights to a -/// buffer (like a semantic highlighter or linter). The function adds a single +/// Useful for plugins that dynamically generate highlights to a buffer +/// (like a semantic highlighter or linter). The function adds a single /// highlight to a buffer. Unlike matchaddpos() highlights follow changes to /// line numbering (as lines are inserted/removed above the highlighted line), /// like signs and marks do. /// -/// "src_id" is useful for batch deletion/updating of a set of highlights. When -/// called with src_id = 0, an unique source id is generated and returned. -/// Succesive calls can pass in it as "src_id" to add new highlights to the same -/// source group. All highlights in the same group can then be cleared with -/// nvim_buf_clear_highlight. If the highlight never will be manually deleted -/// pass in -1 for "src_id". +/// `src_id` is useful for batch deletion/updating of a set of highlights. When +/// called with `src_id = 0`, an unique source id is generated and returned. +/// Successive calls can pass that `src_id` to associate new highlights with +/// the same source group. All highlights in the same group can be cleared +/// with `nvim_buf_clear_highlight`. If the highlight never will be manually +/// deleted, pass `src_id = -1`. /// -/// If "hl_group" is the empty string no highlight is added, but a new src_id +/// If `hl_group` is the empty string no highlight is added, but a new `src_id` /// is still returned. This is useful for an external plugin to synchrounously -/// request an unique src_id at initialization, and later asynchronously add and -/// clear highlights in response to buffer changes. +/// request an unique `src_id` at initialization, and later asynchronously add +/// and clear highlights in response to buffer changes. /// /// @param buffer Buffer handle /// @param src_id Source group to use or 0 to use a new group, /// or -1 for ungrouped highlight /// @param hl_group Name of the highlight group to use -/// @param line Line to highlight +/// @param line Line to highlight (zero-indexed) /// @param col_start Start of range of columns to highlight /// @param col_end End of range of columns to highlight, /// or -1 to highlight to end of line |