From 3c10e662746c70ac0074eba4f2d27bb5ef54cbaa Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 7 Jan 2014 15:10:20 +0530 Subject: [PATCH] Edit book: When searching for text in the editor, center the found text on screen This is a dummy commit, the actual change was accidentally included in the previous commit. --- src/calibre/gui2/tweak_book/editor/text.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/gui2/tweak_book/editor/text.py b/src/calibre/gui2/tweak_book/editor/text.py index 9fc68be4bf..97373da87f 100644 --- a/src/calibre/gui2/tweak_book/editor/text.py +++ b/src/calibre/gui2/tweak_book/editor/text.py @@ -270,6 +270,7 @@ class TextEdit(QPlainTextEdit): c.setPosition(start) c.setPosition(end, c.KeepAnchor) self.setTextCursor(c) + # Center search result on screen self.centerCursor() return True @@ -324,6 +325,7 @@ class TextEdit(QPlainTextEdit): c.setPosition(start) c.setPosition(end, c.KeepAnchor) self.setTextCursor(c) + # Center search result on screen self.centerCursor() return True