From fad162c6c173cc84640ae91dd2b6da5d5a9bc831 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Fri, 3 Jan 2025 23:42:41 +0100 Subject: [PATCH] Give selection counter priority in editor footer (#2155) --- novelwriter/gui/doceditor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/novelwriter/gui/doceditor.py b/novelwriter/gui/doceditor.py index 24fb13e5..65757448 100644 --- a/novelwriter/gui/doceditor.py +++ b/novelwriter/gui/doceditor.py @@ -1251,7 +1251,8 @@ class GuiDocEditor(QPlainTextEdit): self._nwItem.setCharCount(cCount) self._nwItem.setWordCount(wCount) self._nwItem.setParaCount(pCount) - if needsRefresh: + if needsRefresh and not self.textCursor().hasSelection(): + # Selection counter should take precedence (#2155) self._nwItem.notifyToRefresh() self.docFooter.updateWordCount(wCount, False) return