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()}