From 8c1cf0e6a03bff3c9ffda7fe30b18514207484a3 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sun, 1 Feb 2026 03:51:23 +0100 Subject: [PATCH] Add useEffect to refresh line numbers in App.tsx --- src/App.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/App.tsx b/src/App.tsx index f1a26be..5cf4483 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -334,6 +334,13 @@ export default function App() { }; }, [markdownPreview, showLineNumbersActive]); + useEffect(() => { + if (!showLineNumbersActive || markdownPreview) return; + const textarea = textareaRef.current; + if (!textarea) return; + refreshLineNumbers(textarea); + }, [body, markdownPreview, showLineNumbersActive]); + const refreshTexts = useCallback(async () => { setLoadingTexts(true);