Skip to content

Commit f3618cf

Browse files
committed
docs(pick): clarify how default_choose() works for different items
1 parent 7d99f6c commit f3618cf

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

doc/mini-pick.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1012,9 +1012,9 @@ Parameters ~
10121012
Default choose
10131013

10141014
Choose item. Logic follows the rules in |MiniPick-source.items-common|:
1015-
- File and directory are called with |:edit| in the target window, possibly
1016-
followed by setting cursor at the start of line/position/region.
1017-
- Buffer is set as current in target window.
1015+
- File uses |bufadd()| and sets cursor at the start of line/position/region.
1016+
- Buffer is set as current in target window and sets cursor similarly.
1017+
- Directory is called with |:edit| in the target window.
10181018
- Others have the output of |vim.inspect()| printed in Command line.
10191019

10201020
Implements default value for |MiniPick-source.choose|.

lua/mini/pick.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -1134,9 +1134,9 @@ end
11341134
--- Default choose
11351135
---
11361136
--- Choose item. Logic follows the rules in |MiniPick-source.items-common|:
1137-
--- - File and directory are called with |:edit| in the target window, possibly
1138-
--- followed by setting cursor at the start of line/position/region.
1139-
--- - Buffer is set as current in target window.
1137+
--- - File uses |bufadd()| and sets cursor at the start of line/position/region.
1138+
--- - Buffer is set as current in target window and sets cursor similarly.
1139+
--- - Directory is called with |:edit| in the target window.
11401140
--- - Others have the output of |vim.inspect()| printed in Command line.
11411141
---
11421142
--- Implements default value for |MiniPick-source.choose|.

0 commit comments

Comments
 (0)