fix for regresssion in fw/bw navigation
This commit is contained in:
@@ -376,12 +376,18 @@ class BufferedPageRenderer:
|
||||
cached_page = self.buffer.get_page(position)
|
||||
if cached_page:
|
||||
# Get next position from position map
|
||||
next_pos = self.buffer.position_map.get(position, position)
|
||||
next_pos = self.buffer.position_map.get(position)
|
||||
|
||||
# Start background rendering for upcoming pages
|
||||
self.buffer.start_background_rendering(position, 'forward')
|
||||
# Only use cache if we have the forward position mapping
|
||||
# Otherwise, we need to compute it
|
||||
if next_pos is not None:
|
||||
# Start background rendering for upcoming pages
|
||||
self.buffer.start_background_rendering(position, 'forward')
|
||||
|
||||
return cached_page, next_pos
|
||||
return cached_page, next_pos
|
||||
|
||||
# Cache hit for the page, but we don't have the forward position
|
||||
# Fall through to compute it below
|
||||
|
||||
# Render the page directly
|
||||
page, next_pos = self.layouter.render_page_forward(position, font_scale)
|
||||
|
||||
Reference in New Issue
Block a user