Make the comment format action a toggle feature

This commit is contained in:
Veronica Berglyd Olsen
2021-06-13 18:32:11 +02:00
parent cb797fe903
commit fa4f4a8db4
+4
View File
@@ -1728,9 +1728,13 @@ class GuiDocEditor(QTextEdit):
elif theText.startswith("% "):
newText = theText[2:]
cOffset = 2
if docAction == nwDocAction.BLOCK_COM:
docAction = nwDocAction.BLOCK_TXT
elif theText.startswith("%"):
newText = theText[1:]
cOffset = 1
if docAction == nwDocAction.BLOCK_COM:
docAction = nwDocAction.BLOCK_TXT
elif theText.startswith("# "):
newText = theText[2:]
cOffset = 2