diff --git a/nw/gui/doceditor.py b/nw/gui/doceditor.py index 5f12b77a..d76623ce 100644 --- a/nw/gui/doceditor.py +++ b/nw/gui/doceditor.py @@ -773,11 +773,16 @@ class GuiDocEditor(QTextEdit): return False theCursor.beginEditBlock() + if theBlock.length() > 1: + theCursor.setPosition(theBlock.position() + theBlock.length() - 1) theCursor.insertText("\n") + theCursor.insertText("%s: " % keyWord) theCursor.endEditBlock() + self.setTextCursor(theCursor) + return True def closeSearch(self):