aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/pos.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/pos.lua
parenta321c9adadf394430d77f6aac8d0e63088b92fa8 (diff)
downloadrneovim-30a80cbd7c688f32aa79fa764f330ea64e303657.tar.gz
rneovim-30a80cbd7c688f32aa79fa764f330ea64e303657.tar.bz2
rneovim-30a80cbd7c688f32aa79fa764f330ea64e303657.zip
docs: vim.pos
Diffstat (limited to 'runtime/lua/vim/pos.lua')
-rw-r--r--runtime/lua/vim/pos.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/lua/vim/pos.lua b/runtime/lua/vim/pos.lua
index 718e2800e7..65e6a6678f 100644
--- a/runtime/lua/vim/pos.lua
+++ b/runtime/lua/vim/pos.lua
@@ -18,8 +18,8 @@ local validate = vim.validate
---
--- 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)
---
--- -- Operators are overloaded for comparing two `vim.Pos` objects.
--- if pos1 < pos2 then
@@ -127,7 +127,7 @@ end
--- local pos = vim.pos(buf, 3, 5)
---
--- -- Convert to LSP position, you can call it in a method style.
---- local lsp_pos = pos:lsp('utf-16')
+--- local lsp_pos = pos:to_lsp('utf-16')
--- ```
---@param position_encoding lsp.PositionEncodingKind
function Pos:to_lsp(position_encoding)