mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-04-28 04:19:27 -07:00
fix: address fullscreen and n-plus-one review notes
This commit is contained in:
@@ -1955,7 +1955,7 @@ function refreshLinuxVisibleOverlayAfterMpvFullscreenChange(): void {
|
||||
}
|
||||
|
||||
mainWindow.hide();
|
||||
mainWindow.show();
|
||||
mainWindow.showInactive();
|
||||
ensureOverlayWindowLevel(mainWindow);
|
||||
}
|
||||
|
||||
|
||||
@@ -394,6 +394,9 @@ export function markNPlusOneTargets(
|
||||
return [];
|
||||
}
|
||||
|
||||
const normalizedSourceText =
|
||||
typeof sourceText === 'string' ? sourceText.replace(/\r?\n/g, ' ').trim() : undefined;
|
||||
|
||||
const markedTokens = tokens.map((token) => ({
|
||||
...token,
|
||||
isNPlusOneTarget: false,
|
||||
@@ -431,7 +434,7 @@ export function markNPlusOneTargets(
|
||||
for (let i = 0; i < markedTokens.length; i++) {
|
||||
const token = markedTokens[i];
|
||||
if (!token) continue;
|
||||
if (hasSentenceBoundaryInSourceGap(sourceText, previousTokenEnd, token.startPos)) {
|
||||
if (hasSentenceBoundaryInSourceGap(normalizedSourceText, previousTokenEnd, token.startPos)) {
|
||||
markSentence(sentenceStart, i);
|
||||
sentenceStart = i;
|
||||
}
|
||||
|
||||
@@ -353,8 +353,12 @@ export class HyprlandWindowTracker extends BaseWindowTracker {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
const output = execSync('hyprctl -j monitors', { encoding: 'utf-8' });
|
||||
return parseHyprctlMonitors(output);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private getWindowCommandLine(pid: number): string | null {
|
||||
|
||||
Reference in New Issue
Block a user