mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Fix #1812400 [Cursor missplace on show_partial_cfi_in_editor() function](https://bugs.launchpad.net/calibre/+bug/1812400)
This commit is contained in:
parent
294ef5a206
commit
f0cc46958c
@ -1417,8 +1417,13 @@ class Boss(QObject):
|
|||||||
if node is not None:
|
if node is not None:
|
||||||
lnum = node.get('data-lnum')
|
lnum = node.get('data-lnum')
|
||||||
if lnum:
|
if lnum:
|
||||||
|
tags_before = []
|
||||||
|
for tag in root.xpath('//*[data-lnum="%s"]' % lnum):
|
||||||
|
tags_before.append(tag)
|
||||||
|
if tag is node:
|
||||||
|
break
|
||||||
lnum = int(lnum)
|
lnum = int(lnum)
|
||||||
editor.current_line = lnum
|
editor.goto_sourceline(lnum, tags_before, attribute='id' if node.get('id') else None)
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user