Skip to content

Conversation

@aryanchoudharypro
Copy link
Contributor

this pr adds a navigation wrap feature that can be enabled in settings. When enabled, it will wrap the user to the end or start of the document, depending on the direction they are moveing.

@trypsynth
Copy link
Owner

This looks great to me, but I am curious why you changed only a few functions to take a long instead of a size_t? To be clear I actually think size_t isn't the correct choicehere everywhere I used it, size_t is supposed to hold any object size on the given platform, meanwhile int is going to be a signed integer of the CPUs byte size, but why only these functions, and why long?

@aryanchoudharypro
Copy link
Contributor Author

This looks great to me, but I am curious why you changed only a few functions to take a long instead of a size_t? To be clear I actually think size_t isn't the correct choicehere everywhere I used it, size_t is supposed to hold any object size on the given platform, meanwhile int is going to be a signed integer of the CPUs byte size, but why only these functions, and why long?

to account for the negative value, EG, -1 for wrapping cause size_t is unsigned

@trypsynth
Copy link
Owner

No, I got that, sorry. My question was Why only in the next* functions?

@aryanchoudharypro
Copy link
Contributor Author

because size_t can handle that number even if it gets large. i can change them to long as well if you want though.

@trypsynth trypsynth merged commit 37d1d29 into trypsynth:master Oct 25, 2025
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.

2 participants