Skip to content

Commit

Permalink
docs: fix Picker:get_row(index) doc string (nvim-telescope#1515)
Browse files Browse the repository at this point in the history
  • Loading branch information
mroavi authored Nov 30, 2021
1 parent ce8c8d4 commit ef24554
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lua/telescope/pickers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit ef24554

Please sign in to comment.