mirror of
https://github.com/TrianguloY/LightningLauncher.git
synced 2024-12-26 09:58:20 +01:00
Fix crash when searching from end of file.
This commit is contained in:
parent
4b0d443d10
commit
5b715fc6b4
1 changed files with 3 additions and 2 deletions
|
@ -75,8 +75,9 @@ public class Search {
|
|||
Matcher matcher = pattern.matcher(text);
|
||||
if(!mChkBackwards.isChecked()) {
|
||||
// search fordwards
|
||||
|
||||
if( matcher.find(mEditText.getSelectionStart() + 1) || matcher.find(0)){
|
||||
int from = mEditText.getSelectionStart();
|
||||
if (from != mEditText.getSelectionEnd()) from++; // avoids returning the current selection
|
||||
if( matcher.find(from) || matcher.find(0)){
|
||||
// found one just after the selection or from the beginning
|
||||
start = matcher.start();
|
||||
end = matcher.end();
|
||||
|
|
Loading…
Reference in a new issue