summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorMartin Roa Villescas <mroavi@gmail.com>2021-11-30 21:27:20 +0100
committerGitHub <noreply@github.com>2021-11-30 21:27:20 +0100
commitef245548a858690fa8f2db1f1a0eaf41b93a6ef6 (patch)
tree2993cb1eb358dded99bfb8c63353f0643d46d1af /lua
parentce8c8d4a458adeea745638c36e952bf9ab37b0aa (diff)
docs: fix `Picker:get_row(index)` doc string (#1515)
Diffstat (limited to 'lua')
-rw-r--r--lua/telescope/pickers.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/lua/telescope/pickers.lua b/lua/telescope/pickers.lua
index 865b985..c4cdd53 100644
--- a/lua/telescope/pickers.lua
+++ b/lua/telescope/pickers.lua
@@ -159,10 +159,10 @@ function Picker:new(opts)
return obj
end
---- Take a row and get an index.
+--- Take an index and get a row.
---@note: Rows are 0-indexed, and `index` is 1 indexed (table index)
----@param index number: The row being displayed
----@return number The row for the picker to display in
+---@param index number: The index in line_manager
+---@return number: The row for the picker to display in
function Picker:get_row(index)
if self.sorting_strategy == "ascending" then
return index - 1
@@ -174,7 +174,7 @@ end
--- Take a row and get an index
---@note: Rows are 0-indexed, and `index` is 1 indexed (table index)
---@param row number: The row being displayed
----@return number The index in line_manager
+---@return number: The index in line_manager
function Picker:get_index(row)
if self.sorting_strategy == "ascending" then
return row + 1