Skip to content

Commit

Permalink
Fix disabled scan resolution in ja, zh, yue, and ko (#1599)
Browse files Browse the repository at this point in the history
* Fix flipped OR/AND

* Cut out redundant parentheses
  • Loading branch information
Kuuuube authored Nov 25, 2024
1 parent a9d949f commit 6278812
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/js/language/text-scanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,8 @@ export class TextScanner extends EventDispatcher {
null
);

if (this._scanResolution === 'word' && (!disallowExpandStartOffset ||
(this._language === null || !SCAN_RESOLUTION_EXCLUDED_LANGUAGES.has(this._language)))) {
if (this._scanResolution === 'word' && !disallowExpandStartOffset &&
(this._language === null || !SCAN_RESOLUTION_EXCLUDED_LANGUAGES.has(this._language))) {
// Move the start offset to the beginning of the word
textSource.setStartOffset(this._scanLength, this._layoutAwareScan, true);
}
Expand Down

0 comments on commit 6278812

Please sign in to comment.