Attach (recommended) or Link to PDF file here:
[NHA-20211231-A-018_before.pdf](https://github.com/mozilla/pdf.js/files/8055863/NHA-20211231-A-018_before.pdf)

Configuration:
- Web browser and its version: Firefox nightly
- Operating system and its version: Windows 11

Steps to reproduce the problem:
1. Search for "a"
2. Some highlighter results are wrong

![image](https://user-images.githubusercontent.com/5641725/153760070-61708a75-524c-4a21-bc1f-7745e9151b97.png)

After investigations some results are shifted because of a bug with "-\n".
  
    
    this._firstPageCapability.promise.then(() => {
      
      if (
        !this._pdfDocument ||
        (pdfDocument && this._pdfDocument !== pdfDocument)
      ) {
        return;
      }
      
      if (this._findTimeout) {
        clearTimeout(this._findTimeout);
        this._findTimeout = null;
      }
      
      
      
      
      if (this._resumePageIdx) {
        this._resumePageIdx = null;
        this._dirtyMatch = true;
      }
      
      this._updateUIState(FindState.FOUND);
      this._highlightMatches = false;
      this._updateAllPages(); 
    });
  }
  _requestMatchesCount() {
    const { pageIdx, matchIdx } = this._selected;
    let current = 0,
      total = this._matchesCountTotal;
    if (matchIdx !== -1) {
      for (let i = 0; i < pageIdx; i++) {
        current += this._pageMatches[i]?.length || 0;
      }
      current += matchIdx + 1;
    }
    
    
    
    if (current < 1 || current > total) {
      current = total = 0;
    }
    return { current, total };
  }
  _updateUIResultsCount() {
    this._eventBus.dispatch("updatefindmatchescount", {
      source: this,
      matchesCount: this._requestMatchesCount(),
    });
  }
  _updateUIState(state, previous = false) {
    this._eventBus.dispatch("updatefindcontrolstate", {
      source: this,
      state,
      previous,
      matchesCount: this._requestMatchesCount(),
      rawQuery: this._state?.query ?? null,
    });
  }
}
export { FindState, PDFFindController };
