Skip to content
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

Sometimes we don't want to auto-navigate on zipper create #125

Closed
lread opened this issue Feb 9, 2021 · 1 comment
Closed

Sometimes we don't want to auto-navigate on zipper create #125

lread opened this issue Feb 9, 2021 · 1 comment

Comments

@lread
Copy link
Collaborator

lread commented Feb 9, 2021

Scenario
By default a new zipper will auto-navigate to the first non comment/whitespace node.

This is normally what we want.

But this is not always what we want. For example we don't want this when walking a zipper, we want to hit all nodes so want to start from the root node.

First Idea
Zipper creation functions already have an options map.
Consider adding an option to not auto-navigate.

Maybe :auto-navigate with a default of true (for backward compatibility).

Alternative Idea
Make it dead simple to navigate to top regardless of your current position by adding a top fn to zip API.

@lread
Copy link
Collaborator Author

lread commented Sep 30, 2022

Newer dupe #189 replaces this issue and proposes a better solution (thanks @mainej!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

1 participant