From de43eb05d2e43ab31effce3dcca62ad91a556b26 Mon Sep 17 00:00:00 2001
From: Elizabeth Hunt <me@liz.coffee>
Date: Sun, 5 Oct 2025 16:42:02 -0700
Subject: Init

---
 src/components/grid/Cell.tsx | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

(limited to 'src/components/grid/Cell.tsx')

diff --git a/src/components/grid/Cell.tsx b/src/components/grid/Cell.tsx
index fe91da8..1a21164 100644
--- a/src/components/grid/Cell.tsx
+++ b/src/components/grid/Cell.tsx
@@ -4,13 +4,20 @@ import { getStyleForAnsiColor } from '@/utils/ansi';
 interface CellProps {
     cell: GridCell;
     onClick?: () => void;
+    onMouseEnter?: () => void;
 }
 
-export const Cell: React.FC<CellProps> = ({ cell, onClick }) => {
+export const Cell: React.FC<CellProps> = ({ cell, onClick, onMouseEnter }) => {
+    const handleMouseDown = (e: React.MouseEvent) => {
+        e.preventDefault(); // Prevent text selection
+        onClick?.();
+    };
+
     return (
         <span
             className={`grid-cell ${onClick ? 'highlightable' : ''}`}
-            onMouseDown={onClick}
+            onMouseDown={handleMouseDown}
+            onMouseEnter={onMouseEnter}
             style={getStyleForAnsiColor(cell.color)}
         >
             {cell.char === ' ' ? '\u00A0' : cell.char}
-- 
cgit v1.3

