Closed TD-Sky closed 1 month ago
This is expected behavior. For safety reasons, the visual mode is designed as a temporary selection state because there are cases where selection failures can occur due to nested selection conflicts:
If your plugin needs to support visual mode, simply send an escape
command:
ya.manager_emit("escape", { visual = true })
Take a look at how the chmod.yazi
plugin does it: https://github.com/yazi-rs/plugins/blob/main/chmod.yazi/init.lua#L14
Closing as it's expected
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?
wezterm
yazi --debug
outputDid 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
cx.active.selected
is empty when there are items selected in visual mode.Minimal reproducer
git clone https://github.com/TD-Sky/sudo.yazi.git ~/.config/yazi/plugins/sudo.yazi
cargo install nu
or use your favorite package managerya.dbg(#cx.active.selected)
in ~/.config/yazi/plugins/sudo.yazi/init.lua:47`#cx.active.selected
equals 0Anything else?
No response