Added config parameter "link-hadjust" with default value true. When set to false,
following internal links do not change the horizontal position of the page, only
the vertical position.
Also updates page number when following links, now.
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This patch implements a page cache that is invalidated in a LRU fashion.
Pages are added to the cache as soon as they become visible. When the cache is
full and a new page that isn't in the cache becomes visible, the least recently
viewed page in the cache is evicted from memory and the new one takes it's
place.
The cache size is configurable using the page-cache-size configuration
variable, with a default value of 15 pages. Very large values for the cache
size are not recommended, though, as it will stress the system memory out.
The old periodic page reclaiming code is no longer necessary with this patch,
so I removed it.
Special thanks to Ignas Anikevičius, and Sebastian Ramacher for the
inspirations.
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
"focus_inputbar" and "toggle_page_mode" were defined in code but not
declared as shortcut functions (and thus could not be mapped to
different keys by the user using "map").
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
Also alphabetize the shortcut functions declarations in code, to make it
easier to keep the documentation and code in sync.
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
The incremental-search config parameter enables / disables the incremental
search. I've set it disabled by default, as in large files it may become
unresponsive for some time.
Signed-off-by: Sebastian Ramacher <s.ramacher@gmx.at>
If option recolor-keephue is true, the recoloring algorithm
only adjusts the lightness of the original color, keeping the
rest of the properties close to the original.
When recolor-keephue is set to false, the recoloring is performed
as it was before, interpolating linearly between recolor-lightcolor
and recolor-darkcolor except for a different weighting for the
lightness which is closer to perception.
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
1) zoom-center :: bool
zoom-center = false
If zoom-center = false nothing changes.
If zoom-center = true zooming respects the horizontal center of the
pageview. That is, the vertical line dividing the displayed part of
the document doesn't move within the document.
Reasoning: When viewing a pdf with a margin we usually want to hide the
margin at both sides by zooming in.
2) scroll-hstep :: float
scroll-hstep = -1
If scroll-hstep < 0 nothing changes.
If scroll-hstep >= 0 then scroll-hstep defines the scroll step in the
horizontal direction.
Reasoning: This allows us to make finer adjustments in the horizontal
direction without the mouse and without loosing the ablility to
navigate quickly through the document.
3) search-hadjust :: bool
search-hadjust = true
If search-hadjust = true nothing changes.
If search-hadjust = false searching does not adjust the horizontal
center of the document when showing search results.
Reasoning: When viewing a pdf with a margin we usually want to hide
the margin at both sides by zooming in. The horizontal adjustment
sometimes hides parts of the document by moving the horizontal
center.