This is obviously nonsense - in the end, skipfold never actually moves the cursor when it says so. The reason no one has caught this so far is that wherever we use the function, we continue the search loops in this case (on return value 1), go on finding the next match, so if the fold is contained by the window area, we will eventually reach a target outside the fold anyway, if there is one (by doing some unnecessary work).
The line
has been replaced by
in this commit.
This is obviously nonsense - in the end,
skipfold
never actually moves the cursor when it says so. The reason no one has caught this so far is that wherever we use the function, we continue the search loops in this case (on return value1
), go on finding the next match, so if the fold is contained by the window area, we will eventually reach a target outside the fold anyway, if there is one (by doing some unnecessary work).