From df3b2219dca8ba882bb0a9c4e1e72f6f2ff9d0b4 Mon Sep 17 00:00:00 2001 From: "LAPTOP-O016UC3M\\Qi Chen" <16399091+binaricat@users.noreply.github.com> Date: Fri, 12 Dec 2025 22:31:27 +0800 Subject: [PATCH] Refines whitespace for improved code consistency Standardizes whitespace in terminal components to enhance code readability and maintain consistent formatting. No functional changes made. --- components/Terminal.tsx | 10 +++++----- components/terminal/TerminalSearchBar.tsx | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/Terminal.tsx b/components/Terminal.tsx index 7a1047b9d..4552d5ff1 100644 --- a/components/Terminal.tsx +++ b/components/Terminal.tsx @@ -1711,13 +1711,13 @@ const TerminalComponent: React.FC = ({ setSearchMatchCount(null); return false; } - + // Store the search term for findNext/findPrevious searchTermRef.current = term; - + // Clear previous decorations searchAddon.clearDecorations(); - + // Perform search (findNext from current position or start) const found = searchAddon.findNext(term, { regex: false, @@ -1732,7 +1732,7 @@ const TerminalComponent: React.FC = ({ activeMatchColorOverviewRuler: '#FF8800', }, }); - + // Update match count after search // Note: xterm search addon doesn't expose match count directly // We'll track it by counting via findAll (if available) or estimate @@ -1743,7 +1743,7 @@ const TerminalComponent: React.FC = ({ } else { setSearchMatchCount({ current: 0, total: 0 }); } - + return found; }, []); diff --git a/components/terminal/TerminalSearchBar.tsx b/components/terminal/TerminalSearchBar.tsx index a6c6b9104..a2ff6f277 100644 --- a/components/terminal/TerminalSearchBar.tsx +++ b/components/terminal/TerminalSearchBar.tsx @@ -69,7 +69,7 @@ export const TerminalSearchBar: React.FC = ({ if (!isOpen) return null; return ( -
e.stopPropagation()} onMouseDown={(e) => e.stopPropagation()}