Quote:
Originally Posted by kovidgoyal
Probably a performance optimization
|
Hi, Kovid.
I didn't notice any impact on performance. Running ACE with the plugin takes roughly the same time as with the command line tool (on my sistem, the diference is around 0.3s).
When I click on a message (wich uses the CFI function), the file opens instantaneously, with the cursor on the right line.
Quote:
Originally Posted by kovidgoyal
see if it can be implemented for at least a couple of lines without too much impact.
|
I'm attaching the plugin, in case you want to test it yourself (if you have the ACE tool installed, anyway).
I've incorporated your code into the plugin for older versions of calibre, and let it run normally for the 3.38 and later versions.
Take a look at the
go_to_line() function.
--------------
As for the issue itself, its not about the position of the ID, as I supected before. It affects
any attribute wich spans for 2 "lines". The cursor will be placed at the end of that attribute value.
P.S.: in case you need a book to test, use the attached file (scrambled). The issue is more easily noticed on the footnote references (when ACE complains about the correspondent ARIA role for it, doc-noteref).