aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluukvbaal <luukvbaal@gmail.com>2023-04-30 14:36:54 +0200
committerGitHub <noreply@github.com>2023-04-30 14:36:54 +0200
commit064bf39c467afa797206684d0a6dd2a9ecbe65f9 (patch)
treecb51d9f524398b6c675fac95d6c98a33cfc3d21a
parent4f3f81ed86542109824bd199198fb43e6fccdc17 (diff)
downloadrneovim-064bf39c467afa797206684d0a6dd2a9ecbe65f9.tar.gz
rneovim-064bf39c467afa797206684d0a6dd2a9ecbe65f9.tar.bz2
rneovim-064bf39c467afa797206684d0a6dd2a9ecbe65f9.zip
docs: fix erroneous nvim_buf_set_extmark example (#23404)
-rw-r--r--runtime/doc/api.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index 2e1f58d0e3..62afdc5830 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -408,13 +408,13 @@ id. Thus, instead of >lua
<
use >lua
-- create the highlight through an extmark
- extid = vim.api.nvim_buf_set_extmark(buf, ns_id, hl_group, line, col_start, {end_col = col_end, hl_group = hl_group})
+ extid = vim.api.nvim_buf_set_extmark(buf, ns_id, line, col_start, {end_col = col_end, hl_group = hl_group})
-- example: modify the extmark's highlight group
vim.api.nvim_buf_set_extmark(buf, ns_id, NEW_HL_GROUP, line, col_start, {end_col = col_end, hl_group = hl_group, id = extid})
-- example: change the highlight's position
- vim.api.nvim_buf_set_extmark(buf, ns_id, hl_group, NEW_LINE, col_start, {end_col = col_end, hl_group = hl_group, id = extid})
+ vim.api.nvim_buf_set_extmark(buf, ns_id, NEW_LINE, col_start, {end_col = col_end, hl_group = NEW_HL_GROUP, id = extid})
<
Example using the Python API client (|pynvim|):