Skip to content

Fix scrolling jump between pages#23

Closed
sergiogarciadev wants to merge 1 commit into
mentebinaria:mainfrom
sergiogarciadev:fix-scroll
Closed

Fix scrolling jump between pages#23
sergiogarciadev wants to merge 1 commit into
mentebinaria:mainfrom
sergiogarciadev:fix-scroll

Conversation

@sergiogarciadev
Copy link
Copy Markdown
Contributor

This PR fixes #5.

To effectively fix this, we need to have in memory the previous and next caches (4096 bytes), which means that instead of loading just 4096 bytes we must load 3x that, this has no significant impact on performance due to still being very small.

It may have a small performance impact on search, due to repeated reading the same blocks, but due to OS cache this should be minimal and it avoid a major refactor on project.

@merces
Copy link
Copy Markdown
Member

merces commented Dec 18, 2025

Wow, thanks for working on this. I tested it and it indeed solves this problem, but it somehow breaks long searches.

To reproduce:

  1. Unpack putty.exe from putty.zip
  2. Open putty.exe in dz6.
  3. Press /, type tamperproof, then Enter.

It goes to F33A8, but the string is actually at F23A8.

It also breaks o key if the next other byte is far from the current offset:

  1. Unpack ls from ls.zip.
  2. Open ls in dz6.
  3. Go to offset 0x30 with :30.
  4. Press o.

It goes to 0x1000, but the next other byte is at 0x4000.

Also Alt+s shows 2604 strings in ls, which is exactly three times 868 (the correct number of strings).

Do you think you can fix it?

Thanks in advance.

@sergiogarciadev
Copy link
Copy Markdown
Contributor Author

This was supersede by #24

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.

Transition to next cache page could be smoother

2 participants