01ff5cb4ce commented out redisplay and
added assert, without specifying why, will err on the side of "it was
a debugging leftover" (after all the commit in question was a WIP) and
return things to the way they were (i.e. post redisplay instead of
dying)
Currently the assert can be triggered while navigating ML2015-talk.pdf
in presentation mode.
There likely to be ton of pitfalls, but it does work. Furthermore the
book i'm currently reading has two columns and so i split them due to
<reasons> furthermore at times i cut interesting portions. This lovely
commit makes things that much easier for me.
https://www.youtube.com/watch?v=8z8SpgmF0sA (It's good to be The King)
C code was mostly copy pasted from
$MUPDF/platform/gl/gl-annotate.c:save_attachment_dialog
This piggybacks on existing savepath-command.
Testing was done when savepath-command was set to "echo '%s'" and a
document from https://github.com/moosotc/llpp/issues/170 [1]. The
annotation rectangles an the fifth page overlap making it impossible
to use mouse to click on the icon with a pin (file attachment
annotation), however one can enter keyboard navigation mode (set to
insert by default) and select last/covered annotation rectangle with
the keyboard) (selecting this annotation via hint mode (bound to 'F'
by default) works too)
[1] https://github.com/moosotc/llpp/files/6566150/CorrectionLEMAIRE_SAKURA.AMELIE_CPFR_DEV02.pdf
How it was found:
An attempt was made to search for 'a' in an infinitely tall document
(HTML font test page produced by llppac with
Extended parameters » reflowable Layout » height
set to zero)
Searching took surprisingly long time. At some point ml_postprocess
was trying to acquire the lock, failed, schedulled a redisplay, which
failed because concurently running earch was holding it), tho "fix" is
to not even attempt postprocessing.
Maybe someday enough courage will be found to tackle the problem
"properly".
Move control over reflowable layout parameters out of the command line
into the info screen. This also moved the parameters from state into
config, thus making them persistent.
Use case:
a epub with a text that is laid out too wide (for me)
[grantted - it is s possible to just go and edit the .css inside the
.epub but this is, arguably, a better approach
besides layout-height Arg docstring was, probably, incorrect]
Negative and zero indicate the fact that link wasn't found, otherwise
one plus link index is returned. Price one has to pay for not wanting
to deal with exceptions or sum type returns.
This fixes the behavior in cases where a link is on the page following
the one without links at all.
Some keyboards (like the one that is used to write this commit
message) do not have arrow keys, thus remappping code/hack was
introduced that maps home row key_codes_ to arrows. h (help/history)
is on the home row (Dvorak) and so the hack on the hack was added to
recognize those as just letters when certain masks are used. But
alt-left/right was reserved for navigational history traversal. So
remove the second hack layer and deal with the fact that history is
not accessible in a remapped case. The whole situation is less than
ideal.