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

Jump to the next young file #1698

Merged
merged 1 commit into from
Jul 28, 2023
Merged

Jump to the next young file #1698

merged 1 commit into from
Jul 28, 2023

Conversation

ANtlord
Copy link
Contributor

@ANtlord ANtlord commented Jul 22, 2023

Forward jumping to the next young file is implemented. The starting position from which the next young file is searched is the current cursor position or the next position if the current position of the cursor points to a young file. The starting position from which the next young file is searched is the next position. If there no young file has been found, the search starts from the beginning. It stops at the initial position where the search has started.

src/nnn.c Outdated Show resolved Hide resolved
src/nnn.c Outdated Show resolved Hide resolved
src/nnn.h Outdated Show resolved Hide resolved
src/nnn.c Outdated Show resolved Hide resolved
src/nnn.h Outdated Show resolved Hide resolved
@ANtlord ANtlord force-pushed the young-files branch 3 times, most recently from a590022 to 9f5ad01 Compare July 23, 2023 15:18
Copy link
Collaborator

@N-R-K N-R-K left a comment

Choose a reason for hiding this comment

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

Looks okay. But please remove this line from the commit message:

The starting position from which the next young file is searched is the current cursor position or the next position if the current position of the cursor points to a young file.

This is not the case anymore with the new loop. And even in the old loop, this was dead code:

  • If initial file was young, it'd get skipped (before the loop).
  • If initial file wasn't young, it'd get skipped as well (but this time inside the loop).

So the initial file was always being skipped anyways.

@ANtlord ANtlord force-pushed the young-files branch 2 times, most recently from 4faf4f6 to 9d9394b Compare July 24, 2023 10:46
@ANtlord
Copy link
Contributor Author

ANtlord commented Jul 24, 2023

Looks like I should correct the patches also. Is that correct?

Copy link
Collaborator

@N-R-K N-R-K left a comment

Choose a reason for hiding this comment

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

Looks like I should correct the patches also. Is that correct?

Feel free to do it if you want to. Otherwise I'll look at it tomorrow.

Forward jumping to the next young file is implemented. The starting
position from which the next young file is searched is the next
position. If no young file has been found, the search starts from the
beginning. It stops at the initial position where the search has
started.
@N-R-K N-R-K force-pushed the young-files branch 2 times, most recently from 8671b2b to dedf055 Compare July 25, 2023 02:29
@N-R-K
Copy link
Collaborator

N-R-K commented Jul 25, 2023

Weird, looks like the --merge option in check-patches.sh is what's causing the patches to fail... It works fine otherwise. I'll look into it later.

@jarun jarun merged commit d65a095 into jarun:master Jul 28, 2023
7 checks passed
@jarun
Copy link
Owner

jarun commented Jul 28, 2023

Thank you!

@github-actions github-actions bot locked and limited conversation to collaborators Aug 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants