mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-02 18:42:58 +02:00
...
This commit is contained in:
parent
9bf60add18
commit
6ed0ec5a70
1 changed files with 3 additions and 3 deletions
|
|
@ -318,12 +318,12 @@ def cursor_position_with_sourceline(self, cursor):
|
|||
containing tag. '''
|
||||
block = cursor.block()
|
||||
offset = cursor.position() - block.position()
|
||||
block, boundary = next_tag_boundary(block, offset, forward=False)
|
||||
if block is None:
|
||||
nblock, boundary = next_tag_boundary(block, offset, forward=False)
|
||||
if nblock is None:
|
||||
return None, None
|
||||
if boundary.is_start:
|
||||
# We are inside a tag, use this tag
|
||||
start_block, start_offset = block, boundary.offset
|
||||
start_block, start_offset = nblock, boundary.offset
|
||||
else:
|
||||
tag = find_closest_containing_tag(block, offset)
|
||||
if tag is None:
|
||||
|
|
|
|||
Loading…
Reference in a new issue