Skip to content

fix: preserve custom encoding row cache boundaries - #2846

Merged
WerWolv merged 2 commits into
WerWolv:masterfrom
atirna:fix/custom-encoding-row-boundaries
Aug 16, 2026
Merged

fix: preserve custom encoding row cache boundaries#2846
WerWolv merged 2 commits into
WerWolv:masterfrom
atirna:fix/custom-encoding-row-boundaries

Conversation

@atirna

@atirna atirna commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Problem description

Fixes #2805. The custom encoding view could use continuation offsets written by earlier repaint passes at the wrong row index, causing scroll-dependent decoding errors around row boundaries for multi-byte encodings.

Implementation description

Store a computed continuation only when rendering the current cache tail. The cache therefore keeps one decode-start offset per file row instead of appending stale offsets on every repaint. Adds a focused EncodingLineStartAddressCache helpers test that covers both already-cached rows and tail extension.

Screenshots

Not applicable; this corrects decoding state rather than layout.

Additional things

The PR adds focused regression coverage for the cache-tail behavior.

Comment thread lib/libimhex/include/hex/helpers/encoding_line_cache.hpp Outdated
@WerWolv

WerWolv commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Simply for transparency sake, this entire PR and interaction feels extremely like I'm talking to an LLM.
Did you use AI for this change?

@atirna

atirna commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

Hi @WerWolv , I did use AI for review/and quick fix to your comment using a review bot. But initial code change/and submissions were done by me.

@WerWolv
WerWolv merged commit cec5ebb into WerWolv:master Aug 16, 2026
@WerWolv

WerWolv commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Thank you!

@atirna

atirna commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

sorry for trouble, thank you for merge

@atirna
atirna deleted the fix/custom-encoding-row-boundaries branch August 16, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Custom encoding view misaligns multi-byte characters (e.g. GBK) across row boundaries

2 participants