notepad-plus-plus / npp-usermanual

Notepad++ User Manual

Home Page:https://npp-user-manual.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possible general Wrap-around section improvement

alankilborn opened this issue · comments

There appears to be kind of an overview/general statement about Wrap around here:

https://npp-user-manual.org/docs/searching/#:~:text=If%20checked%2C%20when%20the%20search%20reaches%20the%20end%20of%20the%20document%2C%20it%20will%20wrap%20around%20to%20the%20beginning%20and%20continue%20searching.

This is "okay", but here's my experience:
I was wanting to find a manual reference to cite because of notepad-plus-plus/notepad-plus-plus#14909 (comment) . I found the first Searching section reference to Wrap around and basically stopped looking for more (thinking that there weren't any more). Further looking later led me to a more and better reference.

I'm wondering if it wouldn't be better to replace the really really simple "If checked, when the search reaches the end of the document, it will wrap around to the beginning and continue searching" with a bit more of a complete picture, e.g.:


Wrap around

  • When executing a Find Next or a single-step Replace, the document text is examined for a search hit/match starting at the caret position and proceeding forward toward the end-of-file; if the search text is not found and Wrap around is not checkmarked, the search reports that it can't find the text and stops. However, if Wrap around is checked in this situation, searching begins again from the start-of-file (i.e., it wraps around) and text is examined until the caret position is reached (or a search hit occurs).

  • When executing a "find previous" (or a Find Next with Backward direction checkmarked) or a single-step Replace, the document text is examined for a search hit/match starting at the caret position and proceeding backward toward the start-of-file; if the search text is not found and Wrap around is not checkmarked, the search reports that it can't find the text and stops. However, if Wrap around is checked in this situation, searching begins again from the end-of-file (i.e., it wraps around) and text is examined until the caret position is reached (or a search hit occurs).

  • In other single-file search actions, Wrap around may be thought of as "affect entire file" and caret position becomes irrelevant; the file will be processed in one pass from start-of-file to end-of-file.

  • In multiple-file search actions, Wrap around state is completely ignored.


But OTOH it is totally fine if the first statement about Wrap around is meant to be dead simple (as it currently is).

Makes sense to me. Let me know if #655 meets your expectations.

Looks good but I did comment on 1 place in the "code".
Up to your discretion (like everything) if you want to keep that the way it is or change it in some way.