Skip to content

Commit

Permalink
Merge pull request #3928 from inception-project/bugfix/3922-Search-re…
Browse files Browse the repository at this point in the history
…sults-not-showing

#3922 - Search results not showing
  • Loading branch information
reckart authored Apr 5, 2023
2 parents 8f6bfe5 + 55462a8 commit a89cf86
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1071,11 +1071,12 @@ else if (annotationDocumentId != -1
.filter(t -> t.getPositionStart() >= matchStart
&& t.getPositionEnd() < matchEnd)
.mapToInt(MtasTokenString::getOffsetStart).min()
.getAsInt());
.orElse(matchStart));
result.setOffsetEnd(tokens.stream()
.filter(t -> t.getPositionStart() >= matchStart
&& t.getPositionEnd() < matchEnd)
.mapToInt(MtasTokenString::getOffsetEnd).max().getAsInt());
.mapToInt(MtasTokenString::getOffsetEnd).max()
.orElse(matchEnd));
result.setTokenStart(matchStart);
result.setTokenLength(matchEnd - matchStart);
result.setReadOnly(annotationDocument != null
Expand Down

0 comments on commit a89cf86

Please sign in to comment.