diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2026-05-20 11:47:24 +0200 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2026-05-30 12:57:24 +0200 |
| commit | f5fae7aa5cf1e599b2bbc0ef0ae6deccc8c0b3d5 (patch) | |
| tree | 5ac952bcfef2f6d39cae1b2953ed8dc83164e04c /runtime/lua/vim/pos.lua | |
| parent | 88f3f0eeec47d1edf62490861a29317cc5c81c89 (diff) | |
| download | rneovim-f5fae7aa5cf1e599b2bbc0ef0ae6deccc8c0b3d5.tar.gz rneovim-f5fae7aa5cf1e599b2bbc0ef0ae6deccc8c0b3d5.tar.bz2 rneovim-f5fae7aa5cf1e599b2bbc0ef0ae6deccc8c0b3d5.zip | |
docs: misc, options, pos/range
Diffstat (limited to 'runtime/lua/vim/pos.lua')
| -rw-r--r-- | runtime/lua/vim/pos.lua | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/runtime/lua/vim/pos.lua b/runtime/lua/vim/pos.lua index 15cc318ddd..599bd3ab33 100644 --- a/runtime/lua/vim/pos.lua +++ b/runtime/lua/vim/pos.lua @@ -10,10 +10,8 @@ local api = vim.api local validate = vim.validate local util = require('vim.pos._util') ---- Represents a well-defined position. ---- ---- A |vim.Pos| object contains the {row} and {col} coordinates of a position. ---- To create a new |vim.Pos| object, call `vim.pos()`. +--- Represents a buffer position based on [api-indexing] (0-indexed, end-exclusive ranges). +--- Call `vim.pos()` to create a new `vim.Pos` by passing the {buf}, {row}, and {col} of a position. --- --- Example: --- ```lua @@ -170,7 +168,7 @@ end --- Example: --- ```lua --- local cursor_pos = vim.api.nvim_win_get_cursor(0) ---- local pos = vim.pos.lsp(0, cursor_pos) +--- local pos = vim.pos.cursor(0, cursor_pos) --- ``` ---@param buf integer ---@param pos [integer, integer] (lnum, col) tuple |