-
Notifications
You must be signed in to change notification settings - Fork 260
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
No marking if cursor is at end of file #536
Comments
SamKry
pushed a commit
to SamKry/RSyntaxTextArea
that referenced
this issue
Feb 22, 2024
# Pullrequest for issue bobbylight#536 **Description** There is a bug when using `SearchEngine.find(...)` . The problem is, that `getFindInText()` is called before the marking and if there is no text after the cursot (Caret), a `new SearchResult()` is returned. **Steps to Reproduce** Specific steps to reproduce the behavior: 1. Set the cursor at the end of a JTextArea 2. call the `find` method using a valid SearchContext (e.g. search for "e" in a text that contains some "e") 3. Now a empty new SearchResult is returned and no "e" got marked in the text. 4. If you set the cursor one back (second last position), everything works as expected **Expected behavior** All matching results should be marked regardless of the current cursor position. Even if wrap around is disabled **Actual behavior** No marking if cursor at last position. **Screenshots** Add a screenshot if it helps explain the problem. **Java version** jdk-17.0.6.10 **Additional context** Just call `markAllImpl()` before `getFindInText()`.
bobbylight
pushed a commit
that referenced
this issue
Apr 12, 2024
# Pullrequest for issue #536 **Description** There is a bug when using `SearchEngine.find(...)` . The problem is, that `getFindInText()` is called before the marking and if there is no text after the cursot (Caret), a `new SearchResult()` is returned. **Steps to Reproduce** Specific steps to reproduce the behavior: 1. Set the cursor at the end of a JTextArea 2. call the `find` method using a valid SearchContext (e.g. search for "e" in a text that contains some "e") 3. Now a empty new SearchResult is returned and no "e" got marked in the text. 4. If you set the cursor one back (second last position), everything works as expected **Expected behavior** All matching results should be marked regardless of the current cursor position. Even if wrap around is disabled **Actual behavior** No marking if cursor at last position. **Screenshots** Add a screenshot if it helps explain the problem. **Java version** jdk-17.0.6.10 **Additional context** Just call `markAllImpl()` before `getFindInText()`.
Thanks for the bug report and the fix! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
There is a bug when using
SearchEngine.find(...)
. The problem is, thatgetFindInText()
is called before the marking and if there is no text after the cursot (Caret), anew SearchResult()
is returned.Steps to Reproduce
Specific steps to reproduce the behavior:
find
method using a valid SearchContext (e.g. search for "e" in a text that contains some "e")Expected behavior
All matching results should be marked regardless of the current cursor position. Even if wrap around is disabled
Actual behavior
No marking if cursor at last position.
Screenshots
Add a screenshot if it helps explain the problem.
Java version
jdk-17.0.6.10
Additional context
Just call
markAllImpl()
beforegetFindInText()
.I will create a pullrequest with a fix.
The text was updated successfully, but these errors were encountered: