From ecbe9963ab89ffbc20dfd708c370a6bbe379d43f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 22 Dec 2013 19:18:24 +0530 Subject: [PATCH] ... --- src/calibre/gui2/tweak_book/editor/widget.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/calibre/gui2/tweak_book/editor/widget.py b/src/calibre/gui2/tweak_book/editor/widget.py index f2bec6de25..0b92d02577 100644 --- a/src/calibre/gui2/tweak_book/editor/widget.py +++ b/src/calibre/gui2/tweak_book/editor/widget.py @@ -217,6 +217,7 @@ class Editor(QMainWindow): c = self.editor.textCursor() char = '' if not c.atStart(): + c.clearSelection() c.setPosition(c.position()-1, c.KeepAnchor) char = unicode(c.selectedText()) return (c.blockNumber() + 1, c.positionInBlock(), char)