diff --git a/nw/core/index.py b/nw/core/index.py index 84c02a1f..b32fd0c4 100644 --- a/nw/core/index.py +++ b/nw/core/index.py @@ -356,7 +356,7 @@ class NWIndex(): # Count words for remaining text after last heading if nTitle > 0: - lastText = "\n".join(theLines[nTitle-1:nLine-1]) + lastText = "\n".join(theLines[nTitle-1:]) self._indexWordCounts(tHandle, isNovel, lastText, nTitle) # Update timestamps for index changes diff --git a/tests/test_gui.py b/tests/test_gui.py index fd1f426d..53bce03a 100644 --- a/tests/test_gui.py +++ b/tests/test_gui.py @@ -1074,9 +1074,9 @@ def testOutline(qtbot, nwLipsum, nwTemp): assert nwGUI.projMeta.fileValue.text() == "Lorem Ipsum" assert nwGUI.projMeta.itemValue.text() == "Finished" - assert nwGUI.projMeta.cCValue.text() == "122" - assert nwGUI.projMeta.wCValue.text() == "18" - assert nwGUI.projMeta.pCValue.text() == "2" + assert nwGUI.projMeta.cCValue.text() == "230" + assert nwGUI.projMeta.wCValue.text() == "40" + assert nwGUI.projMeta.pCValue.text() == "3" # Scene One actItem = nwGUI.projView.topLevelItem(1)