-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
return user to their previous position if they exit a subdir #725
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put visit_stack
and position_stack
together:
// ...
visit_stack: Vec<(Rc<ListNode>, usize)>
// ...
Correction:
// ...
visit_stack: Vec<(NodeId, usize)>,
// ...
its best we keep them separated |
Besides unnecessarily making a heap allocation, they're both participating in the same functionality; they're best together |
sorry but i see no performance impact with this current implementation, if we want to combine them then we can refactor it in the future. For now this implementation is just a stepping stone. |
Co-authored-by: Adam Perkowski <[email protected]>
My point is less about immediate performance issues and more about not accumulating code that should get refactored down the road... I figure that there's no better time than now |
I also realize that my initial suggestion was actually incorrect, so that might've been confusing the situation. My 3y/o was a little cranky last night, so that made me a little cranky as well :)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks for merging that commit
watch the video
Type of Change
Description
takes the user back to their previous position when they exit a subdir
tested with a subdir inside of a subdir works as expected
tested with a regular subdir works as expected as well
example:
2024-10-02-00-19-31.mp4
before, it would just take u back to the first entry in the list