mirror of
https://github.com/neovim/neovim.git
synced 2025-09-24 20:18:32 +00:00
docs(extmark): fix nvim_buf_get_extmarks example (#17934)
This commit is contained in:
@@ -2453,9 +2453,9 @@ nvim_buf_get_extmarks({buffer}, {ns_id}, {start}, {end}, {opts})
|
|||||||
local pos = a.nvim_win_get_cursor(0)
|
local pos = a.nvim_win_get_cursor(0)
|
||||||
local ns = a.nvim_create_namespace('my-plugin')
|
local ns = a.nvim_create_namespace('my-plugin')
|
||||||
-- Create new extmark at line 1, column 1.
|
-- Create new extmark at line 1, column 1.
|
||||||
local m1 = a.nvim_buf_set_extmark(0, ns, 0, 0, 0, {})
|
local m1 = a.nvim_buf_set_extmark(0, ns, 0, 0, {})
|
||||||
-- Create new extmark at line 3, column 1.
|
-- Create new extmark at line 3, column 1.
|
||||||
local m2 = a.nvim_buf_set_extmark(0, ns, 0, 2, 0, {})
|
local m2 = a.nvim_buf_set_extmark(0, ns, 0, 2, {})
|
||||||
-- Get extmarks only from line 3.
|
-- Get extmarks only from line 3.
|
||||||
local ms = a.nvim_buf_get_extmarks(0, ns, {2,0}, {2,0}, {})
|
local ms = a.nvim_buf_get_extmarks(0, ns, {2,0}, {2,0}, {})
|
||||||
-- Get all marks in this buffer + namespace.
|
-- Get all marks in this buffer + namespace.
|
||||||
|
@@ -259,9 +259,9 @@ ArrayOf(Integer) nvim_buf_get_extmark_by_id(Buffer buffer, Integer ns_id,
|
|||||||
/// local pos = a.nvim_win_get_cursor(0)
|
/// local pos = a.nvim_win_get_cursor(0)
|
||||||
/// local ns = a.nvim_create_namespace('my-plugin')
|
/// local ns = a.nvim_create_namespace('my-plugin')
|
||||||
/// -- Create new extmark at line 1, column 1.
|
/// -- Create new extmark at line 1, column 1.
|
||||||
/// local m1 = a.nvim_buf_set_extmark(0, ns, 0, 0, 0, {})
|
/// local m1 = a.nvim_buf_set_extmark(0, ns, 0, 0, {})
|
||||||
/// -- Create new extmark at line 3, column 1.
|
/// -- Create new extmark at line 3, column 1.
|
||||||
/// local m2 = a.nvim_buf_set_extmark(0, ns, 0, 2, 0, {})
|
/// local m2 = a.nvim_buf_set_extmark(0, ns, 0, 2, {})
|
||||||
/// -- Get extmarks only from line 3.
|
/// -- Get extmarks only from line 3.
|
||||||
/// local ms = a.nvim_buf_get_extmarks(0, ns, {2,0}, {2,0}, {})
|
/// local ms = a.nvim_buf_get_extmarks(0, ns, {2,0}, {2,0}, {})
|
||||||
/// -- Get all marks in this buffer + namespace.
|
/// -- Get all marks in this buffer + namespace.
|
||||||
|
Reference in New Issue
Block a user