feat: allow bufnr optional parameter for get_current_dir function (#440)
This allows for using get_current_dir in cases where currently hovered buffer is not the desired Oil buffer (e.g. displaying directories for multiple different Oil buffers)
This commit is contained in:
parent
d5e56574f8
commit
cc2332599f
3 changed files with 13 additions and 5 deletions
|
|
@ -83,11 +83,15 @@ Change how oil determines if the file is hidden
|
|||
Toggle hidden files and directories
|
||||
|
||||
|
||||
## get_current_dir()
|
||||
## get_current_dir(bufnr)
|
||||
|
||||
`get_current_dir(): nil|string` \
|
||||
`get_current_dir(bufnr): nil|string` \
|
||||
Get the current directory
|
||||
|
||||
| Param | Type | Desc |
|
||||
| ----- | -------------- | --------------------------------------------- |
|
||||
| bufnr | `nil\|integer` | When nil, get directory of the current buffer |
|
||||
|
||||
|
||||
## open_float(dir)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue