From b75abd6aa3bd6453d8b7ba986bc5261f99217c45 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 19 Dec 2020 13:29:34 +0530 Subject: [PATCH] ... --- src/calibre/gui2/tweak_book/editor/text.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/tweak_book/editor/text.py b/src/calibre/gui2/tweak_book/editor/text.py index 24fc698a5b..5f74d04bcd 100644 --- a/src/calibre/gui2/tweak_book/editor/text.py +++ b/src/calibre/gui2/tweak_book/editor/text.py @@ -291,7 +291,7 @@ class TextEdit(PlainTextEdit): pos = c.position() c.beginEditBlock() c.clearSelection() - c.select(c.Document) + c.select(QTextCursor.SelectionType.Document) c.insertText(unicodedata.normalize('NFC', text)) c.endEditBlock() c.setPosition(min(pos, len(text)))