-
Notifications
You must be signed in to change notification settings - Fork 37
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
matches on the right of the screen are ignored #21
Comments
Before only visible part of screen was searched for pattern. Now whole document is searched, and beginings of found text is remembered in document->search_points.
sgwerk, this commit helped or not? Now it behaves more like less. Every n jumps to next search and N to previous. |
Thanks, but unfortunately there are still some problems. On the enclosed file notfound.html elinks goes to the second match, but then doesn't go back to the first when wrapping around. On the second outofmemory.html it crashes (file log). All of this with the version before the last commit. After the very last commit, elinks also crashes on the first file. |
Forgot to say: in both files, the search pattern was "yyy" When checked them again, I realized that the crash on the first file notfound.html was due to a different running condition, not to the last commit. |
@sgerwk For wraparound I must look how it was before. |
The crash happens every time. I start elinks with MemTotal: 770264 kB It's very limited memory, but I got the crash with a mostly unloaded system - no X, no special server active. With elinks running but before starting the search, the situation was: MemTotal: 770264 kB elinks itself used very little memory. Monitoring with top(1), it didn't seem to increase much. Rather, it looked like it tried to malloc() too much at once, and failed. |
@sgerwk I fixed one bug. Try now. |
Thanks, wraparound now works! Regarding memory exhaustion, here is the memory elinks uses on noback.html before searching for "yyy"
and here's after:
Seems like very little is used for viewering the document itself, but a huge amount is allocated after searching. The memory used does not decrease after searching for a non-existing pattern. |
When the document contains pre or table elements, some parts of the document may fall "outside of the screen", on its right. When searching for a pattern that has a match in them, elinks correctly scrolls the screen to make them visible. It however does not if some other matches are already "in the screen".
An example is in this html page
notfound.html.gz
when viewed in 80 columns.
Searching for the pattern "some" highlights the first and third matches. However, the second is not in the screen, and elinks never scrolls to show it when pressing 'n'. It does when searching for "something".
The text was updated successfully, but these errors were encountered: