Skip to content

Commit

Permalink
docs: add missing parameter for dropbar_menu_entry_t:get_component_at()
Browse files Browse the repository at this point in the history
  • Loading branch information
bekaboo committed Jul 2, 2023
1 parent 2c02b28 commit 5ac7e53
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1481,17 +1481,17 @@ multiple `dropbar_menu_entry_t` instances while a
`dropbar_menu_entry_t` has the following methods:
| Method | Description |
| ------ | ------ |
| `dropbar_menu_entry_t:new(opts: dropbar_menu_entry_t?): dropbar_menu_entry_t` | constructor of `dropbar_menu_entry_t` |
| `dropbar_menu_entry_t:del()` | destructor of `dropbar_menu_entry_t` |
| `dropbar_menu_entry_t:cat(): string, dropbar_menu_hl_info_t` | concatenate the components into a string, returns the string and highlight info<sub>[`dropbar_menu_hl_info_t`](#dropbar_menu_hl_info_t) |
| `dropbar_menu_entry_t:displaywidth(): integer` | calculate the display width of the entry |
| `dropbar_menu_entry_t:bytewidth(): integer` | calculate the byte width of the entry |
| `dropbar_menu_entry_t:first_clickable(offset: integer?): dropbar_symbol_t?, { start: integer, end: integer }?` | get the first clickable component<sub>[`dropbar_symbol_t`](#dropbar_symbol_t)</sub> and its range in the dropbar menu entry starting from `offset`, which defaults to 0 |
| `dropbar_menu_entry_t:get_component_at(col: integer): dropbar_symbol_t?, { start: integer, end: integer }?` | get the component<sub>[`dropbar_symbol_t`](#dropbar_symbol_t)</sub> at column position `col` and the range it occupies in the menu entry |
| `dropbar_menu_entry_t:prev_clickable(col: integer): dropbar_symbol_t?, { start: integer, end: integer }?` | get the previous clickable component<sub>[`dropbar_symbol_t`](#dropbar_symbol_t)</sub> and its range in the dropbar menu entry given current column position `col` |
| `dropbar_menu_entry_t:next_clickable(col: integer): dropbar_symbol_t?, { start: integer, end: integer }?` | get the next clickable component<sub>[`dropbar_symbol_t`](#dropbar_symbol_t)</sub> and its range in the dropbar menu entry given current column position `col` |
| Method | Description |
| ------ | ------ |
| `dropbar_menu_entry_t:new(opts: dropbar_menu_entry_t?): dropbar_menu_entry_t` | constructor of `dropbar_menu_entry_t` |
| `dropbar_menu_entry_t:del()` | destructor of `dropbar_menu_entry_t` |
| `dropbar_menu_entry_t:cat(): string, dropbar_menu_hl_info_t` | concatenate the components into a string, returns the string and highlight info<sub>[`dropbar_menu_hl_info_t`](#dropbar_menu_hl_info_t) |
| `dropbar_menu_entry_t:displaywidth(): integer` | calculate the display width of the entry |
| `dropbar_menu_entry_t:bytewidth(): integer` | calculate the byte width of the entry |
| `dropbar_menu_entry_t:first_clickable(offset: integer?): dropbar_symbol_t?, { start: integer, end: integer }?` | get the first clickable component<sub>[`dropbar_symbol_t`](#dropbar_symbol_t)</sub> and its range in the dropbar menu entry starting from `offset`, which defaults to 0 |
| `dropbar_menu_entry_t:get_component_at(col: integer, look_ahead: boolean?): dropbar_symbol_t?, { start: integer, end: integer }?` | get the component<sub>[`dropbar_symbol_t`](#dropbar_symbol_t)</sub> at column position `col` and the range it occupies in the menu entry |
| `dropbar_menu_entry_t:prev_clickable(col: integer): dropbar_symbol_t?, { start: integer, end: integer }?` | get the previous clickable component<sub>[`dropbar_symbol_t`](#dropbar_symbol_t)</sub> and its range in the dropbar menu entry given current column position `col` |
| `dropbar_menu_entry_t:next_clickable(col: integer): dropbar_symbol_t?, { start: integer, end: integer }?` | get the next clickable component<sub>[`dropbar_symbol_t`](#dropbar_symbol_t)</sub> and its range in the dropbar menu entry given current column position `col` |
#### `dropbar_menu_hl_info_t`
Expand Down
5 changes: 4 additions & 1 deletion doc/dropbar.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1743,13 +1743,16 @@ dropbar_menu_entry_t:first_clickable([{offset}])
component occupies in the menu

*dropbar_menu_entry_t:get_component_at()*
dropbar_menu_entry_t:get_component_at({col})
dropbar_menu_entry_t:get_component_at({col}[, {look_ahead}])

Get the compoenent at column position {col} and the range it occupies
in the menu entry

Parameters ~
{col} (integer): column number, 1-based, byte-indexed
• {look_ahead} (boolean?):
whether to look ahead to find a component if no component is
found at {col}

Returns ~
(`dropbar_symbol_t`?): the component at the position
Expand Down

0 comments on commit 5ac7e53

Please sign in to comment.