fix for regresssion in fw/bw navigation
Python CI / test (3.10) (push) Successful in 2m15s
Python CI / test (3.12) (push) Successful in 2m7s
Python CI / test (3.13) (push) Successful in 2m0s

This commit is contained in:
2025-11-10 13:25:04 +01:00
parent 890a0e768b
commit fb52178cc6
2 changed files with 369 additions and 4 deletions
+10 -4
View File
@@ -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)