style(tui): Apply biome formatting fixes

This commit is contained in:
Mario Zechner 2025-08-11 14:18:33 +02:00
parent 6e40c5d761
commit 7e3b94ade6

View file

@ -382,18 +382,17 @@ export class TUI extends Container {
const viewportChangePosition = firstChangedLine - oldViewportStart; const viewportChangePosition = firstChangedLine - oldViewportStart;
// Move cursor to the change position // Move cursor to the change position
const linesToMoveUp = (cursorPosition - oldViewportStart) - viewportChangePosition; const linesToMoveUp = cursorPosition - oldViewportStart - viewportChangePosition;
if (linesToMoveUp > 0) { if (linesToMoveUp > 0) {
output += `\x1b[${linesToMoveUp}A`; output += `\x1b[${linesToMoveUp}A`;
} }
// Now do surgical updates or partial clear based on what's more efficient // Now do surgical updates or partial clear based on what's more efficient
let currentLine = firstChangedLine; let currentLine = firstChangedLine;
let currentViewportLine = viewportChangePosition; const currentViewportLine = viewportChangePosition;
// If we have significant structural changes, just clear and re-render from here // If we have significant structural changes, just clear and re-render from here
const hasSignificantChanges = totalNewLines !== totalOldLines || const hasSignificantChanges = totalNewLines !== totalOldLines || totalNewLines - firstChangedLine > 10; // Arbitrary threshold
(totalNewLines - firstChangedLine) > 10; // Arbitrary threshold
if (hasSignificantChanges) { if (hasSignificantChanges) {
// Clear from cursor to end of screen and render all remaining lines // Clear from cursor to end of screen and render all remaining lines