Closed Zeioth closed 3 months ago
That isn't a bug but intentional. The idea is to make "open" act like "enter" since "enter" only targets the currently hovered file. If you don't want it to work this way, just remove hovered = true
.
Doc of open
: https://yazi-rs.github.io/docs/configuration/keymap#manager.open
That did the trick thanks. I suggest updating the example in the tips
section with hovered = false
to avoid people from running into the same issue.
Well it used to be set to false, but I added it because some users reported accidental triggers, though your experience seems to be the opposite.
Maybe we can add a note explaining it below. Do you want to raise a PR to change it? Just click the "Edit this page" link on that page.
Thank you referring me! Coming from ranger, I would vote for making this plugin the default behavior. It's still possible to open entire directories with:
[manager]
keymap = [
{ on = [ "<C-Enter>" ], run = "open --interactive", desc = "Open the selected files interactively" },
]
Which is probably enough for such a border case.
AFAIK, Ranger doesn't support selecting files across directories, and that's the main reason I set it to true - when you've selected files in multiple directories, it's easy to accidentally trigger something by pressing l
or Enter
in the current directory.
I'm going to lock this issue because it has been closed for 30 days. ⏳ This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
What system are you running Yazi on?
Linux Wayland
What terminal are you running Yazi in?
foot version: 1.17.2 +pgo +ime +graphemes -assertions
yazi --debug
outputx
Did you try the latest nightly build to see if the problem got fixed?
Yes, and I updated the debug information above (
yazi --debug
) to the nightly that I triedDescribe the bug
The example from the website work for single files, but when more than one file is selected, pressing enter, only one file opens.
This bug is only present when using
manager_emit("open")
. Disabling the plugin, I can open multiple files again (but then I wouldn't have smart enter).Expected Behavior
when multiple files are selected,
manager_emit("open")
open all of them.To Reproduce
v
and select multiple text files.Only one file will open. Disabling the plugin solves the issue.
Configuration
No response
Anything else?
Please let me know if you need more details, I'm around.