summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/range.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2026-04-09 17:42:29 +0200
committerJustin M. Keyes <justinkz@gmail.com>2026-04-12 14:17:50 +0200
commit30a80cbd7c688f32aa79fa764f330ea64e303657 (patch)
treedc6e7384beb850c592be3edef8b8d5a6e478f6c7 /runtime/lua/vim/range.lua
parenta321c9adadf394430d77f6aac8d0e63088b92fa8 (diff)
docs: vim.pos
Diffstat (limited to 'runtime/lua/vim/range.lua')
-rw-r--r--runtime/lua/vim/range.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/lua/vim/range.lua b/runtime/lua/vim/range.lua
index 03ad1b3c52..762a33f401 100644
--- a/runtime/lua/vim/range.lua
+++ b/runtime/lua/vim/range.lua
@@ -20,13 +20,13 @@ local api = vim.api
---
--- Example:
--- ```lua
---- local pos1 = vim.pos(3, 5)
---- local pos2 = vim.pos(4, 0)
+--- local pos1 = vim.pos(vim.api.nvim_get_current_buf(), 3, 5)
+--- local pos2 = vim.pos(vim.api.nvim_get_current_buf(), 4, 0)
---
--- -- Create a range from two positions.
--- local range1 = vim.range(pos1, pos2)
--- -- Or create a range from four integers representing start and end positions.
---- local range2 = vim.range(3, 5, 4, 0)
+--- local range2 = vim.range(vim.api.nvim_get_current_buf(), 3, 5, 4, 0)
---
--- -- Because `vim.Range` is end exclusive, `range1` and `range2` both represent
--- -- a range starting at the row 3, column 5 and ending at where the row 3 ends