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

Add use-last parameter #19

Merged
merged 2 commits into from
Jun 30, 2024
Merged

Conversation

freundTech
Copy link
Contributor

Closes #13.
This allows hydra to alternatively display the last instead of the first candidate on a page, mimicking the behavior of LaTeX.

src/core.typ Show resolved Hide resolved
src/core.typ Outdated Show resolved Hide resolved
src/core.typ Show resolved Hide resolved
src/core.typ Outdated Show resolved Hide resolved
@freundTech
Copy link
Contributor Author

Noticed that my PR was already outdated when I created it. Just rebased and force-pushed.

Copy link
Owner

@tingerrr tingerrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few tiny changes and it's good to go! Surprisingly simple solution as it turns out.

src/core.typ Show resolved Hide resolved
src/core.typ Outdated Show resolved Hide resolved
src/lib.typ Outdated Show resolved Hide resolved
@freundTech freundTech force-pushed the feature-use-last branch 2 times, most recently from 2240ac9 to f785574 Compare June 30, 2024 15:11
@freundTech
Copy link
Contributor Author

freundTech commented Jun 30, 2024

I reworked it a bit.
get-candidates no longer considers ctx.use-last, but always returns correct prev, next and last, while execute chooses which of these to display.

execute is now significantly simpler.

@freundTech freundTech requested a review from tingerrr June 30, 2024 15:14
Closes tingerrr#13.
This allows hydra to alternatively display the last instead of the first
candidate on a page, mimicking the behavior of LaTeX.
Copy link
Owner

@tingerrr tingerrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks!

@tingerrr tingerrr merged commit b46c985 into tingerrr:main Jun 30, 2024
1 check passed
@freundTech freundTech deleted the feature-use-last branch June 30, 2024 20:31
@freundTech
Copy link
Contributor Author

Are you planning to make a release for this or are you waiting for more changes?
I would like to stop vendoring hydra into my thesis 😉

@tingerrr
Copy link
Owner

tingerrr commented Jul 3, 2024

I'll prepare some releases today, since I have to fix some stuff on subpar. A shame I couldn't get the mantys PR ready in time, but it is what it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow alternate active selection
2 participants