mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 11:14:02 +02:00
Port the new code recently added to master
This commit is contained in:
parent
be5531a2e1
commit
93ae0d715c
2 changed files with 2 additions and 2 deletions
|
|
@ -228,7 +228,7 @@ def reformat_block(self, block):
|
|||
def apply_format_changes(self, block, formats):
|
||||
layout = block.layout()
|
||||
preedit_start = layout.preeditAreaPosition()
|
||||
preedit_length = layout.preeditAreaText().length()
|
||||
preedit_length = len(layout.preeditAreaText())
|
||||
if preedit_length != 0 and preedit_start != 0:
|
||||
for r in formats:
|
||||
# Adjust range by pre-edit text, if any
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import re
|
||||
|
||||
from PyQt4.Qt import QTextBlockUserData
|
||||
from PyQt5.Qt import QTextBlockUserData
|
||||
|
||||
from calibre.gui2.tweak_book import verify_link
|
||||
from calibre.gui2.tweak_book.editor import syntax_text_char_format, LINK_PROPERTY, CSS_PROPERTY
|
||||
|
|
|
|||
Loading…
Reference in a new issue