Improve the insert keyword feature when in the middle of a paragraph
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user