From e09b5a964e1924d6a490dc48feef01b8c723af1b Mon Sep 17 00:00:00 2001 From: TC Date: Sun, 14 Jun 2026 18:59:35 +1000 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20move=20selection=20word=20count?= =?UTF-8?q?=20to=20bottom?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/components/Editor/Editor.css | 10 ++++++++++ src/renderer/components/Editor/MarkdownEditor.tsx | 5 ++++- src/renderer/components/Toolbar/AnalysisToolbar.tsx | 6 ------ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/renderer/components/Editor/Editor.css b/src/renderer/components/Editor/Editor.css index 08ca322..875f0d1 100644 --- a/src/renderer/components/Editor/Editor.css +++ b/src/renderer/components/Editor/Editor.css @@ -35,6 +35,16 @@ opacity: 0.8; } +.statusbar-selection-wordcount { + opacity: 0.75; +} + +.statusbar-selection-wordcount::before { + content: '·'; + margin-right: 8px; + opacity: 0.5; +} + .statusbar-share-btn { background: none; border: none; diff --git a/src/renderer/components/Editor/MarkdownEditor.tsx b/src/renderer/components/Editor/MarkdownEditor.tsx index 4da635b..dfcf2bf 100644 --- a/src/renderer/components/Editor/MarkdownEditor.tsx +++ b/src/renderer/components/Editor/MarkdownEditor.tsx @@ -685,7 +685,7 @@ export function MarkdownEditor(): JSX.Element { const [commentDraft, setCommentDraft] = useState('') const [wordStats, setWordStats] = useState<{ atCursor: number; total: number }>({ atCursor: 0, total: 0 }) const wordTotalRef = useRef(0) - const { activeFilePath, activeFileContent, setContent, annotations, fontSize, theme, focusMode, scrollPositions, pendingScrollToLine, clearPendingScrollToLine } = useEditorStore() + const { activeFilePath, activeFileContent, setContent, annotations, fontSize, theme, focusMode, scrollPositions, pendingScrollToLine, clearPendingScrollToLine, selectionWordCount } = useEditorStore() function saveComment(): void { if (!pendingComment || !commentDraft.trim()) return @@ -1134,6 +1134,9 @@ export function MarkdownEditor(): JSX.Element { {activeFilePath && (
word {wordStats.atCursor.toLocaleString()} of {wordStats.total.toLocaleString()} + {selectionWordCount !== null && ( + {selectionWordCount.toLocaleString()} selected + )} -{selectionWordCount !== null && ( - - {formatWordCount(selectionWordCount)} sel - - )} {activeFilePath && paragraphRhythm.length > 0 && ( <>