You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If anyone is interested in this issue, please reply below!
Is your feature request related to a problem? Please describe
No response
Will you be willing to contribute this feature?
Yes, I'll give it a shot
Describe the solution you'd like
I'm trying to add support for cross-directory selection, which will allow users to select files from different directories at the same time and perform actions on them (copy, paste, etc.).
However, we must avoid situations of nested selection. For example, a user can select both /a/b, and /a/c, but cannot select /a, /a/b, nor /a/b/c, /a/b, as this would cause abnormalities in functions like copy, cut.
To achieve this, we need to modify the existing structure:
and Selected providing two add() and remove() APIs:
pubstructSelected{inner:BTreeSet<Url>,// Other fields}implSelected{pubfnadd(&mutself,url:&Url) -> bool{}pubfnremove(&mutself,url:&Url){}}
add() and remove() will add the passed URL to the BTreeSet<Url> representing the selected items. If a conflict occurs, add() returns false; otherwise, it returns true. The pseudocode be like:
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.
If anyone is interested in this issue, please reply below!
Is your feature request related to a problem? Please describe
No response
Will you be willing to contribute this feature?
Describe the solution you'd like
I'm trying to add support for cross-directory selection, which will allow users to select files from different directories at the same time and perform actions on them (copy, paste, etc.).
However, we must avoid situations of nested selection. For example, a user can select both
/a/b
, and/a/c
, but cannot select/a
,/a/b
, nor/a/b/c
,/a/b
, as this would cause abnormalities in functions like copy, cut.To achieve this, we need to modify the existing structure:
yazi/yazi-core/src/tab/tab.rs
Line 18 in 53525b5
to:
and
Selected
providing twoadd()
andremove()
APIs:add()
andremove()
will add the passed URL to theBTreeSet<Url>
representing the selected items. If a conflict occurs,add()
returnsfalse
; otherwise, it returnstrue
. The pseudocode be like:Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: