Added tags changed signal

This commit is contained in:
Veronica Berglyd Olsen
2023-11-15 18:11:37 +01:00
parent 3f8220f350
commit 2cb6020cac
5 changed files with 61 additions and 21 deletions
+4 -4
View File
@@ -1783,13 +1783,13 @@ class GuiDocEditor(QPlainTextEdit):
block = cursor.block()
text = block.text()
if len(text) == 0:
return nwTrinary.UNKNOWN
return nwTrinary.NEUTRAL
if text.startswith("@") and isinstance(self._nwItem, NWItem):
isGood, tBits, tPos = SHARED.project.index.scanThis(text)
if not isGood:
return nwTrinary.UNKNOWN
return nwTrinary.NEUTRAL
tag = ""
exist = False
@@ -1806,7 +1806,7 @@ class GuiDocEditor(QPlainTextEdit):
if not tag or tag.startswith("@"):
# The keyword cannot be looked up, so we ignore that
return nwTrinary.UNKNOWN
return nwTrinary.NEUTRAL
if follow and exist:
logger.debug("Attempting to follow tag '%s'", tag)
@@ -1826,7 +1826,7 @@ class GuiDocEditor(QPlainTextEdit):
return nwTrinary.POSITIVE if exist else nwTrinary.NEGATIVE
return nwTrinary.UNKNOWN
return nwTrinary.NEUTRAL
def _openContextFromCursor(self) -> None:
"""Open the spell check context menu at the cursor."""