Make the comment format action a toggle feature
This commit is contained in:
@@ -1728,9 +1728,13 @@ class GuiDocEditor(QTextEdit):
|
|||||||
elif theText.startswith("% "):
|
elif theText.startswith("% "):
|
||||||
newText = theText[2:]
|
newText = theText[2:]
|
||||||
cOffset = 2
|
cOffset = 2
|
||||||
|
if docAction == nwDocAction.BLOCK_COM:
|
||||||
|
docAction = nwDocAction.BLOCK_TXT
|
||||||
elif theText.startswith("%"):
|
elif theText.startswith("%"):
|
||||||
newText = theText[1:]
|
newText = theText[1:]
|
||||||
cOffset = 1
|
cOffset = 1
|
||||||
|
if docAction == nwDocAction.BLOCK_COM:
|
||||||
|
docAction = nwDocAction.BLOCK_TXT
|
||||||
elif theText.startswith("# "):
|
elif theText.startswith("# "):
|
||||||
newText = theText[2:]
|
newText = theText[2:]
|
||||||
cOffset = 2
|
cOffset = 2
|
||||||
|
|||||||
Reference in New Issue
Block a user