8051Enthusiast / biodiff

Hex diff viewer using alignment algorithms from biology
MIT License
818 stars 27 forks source link

Feature request: (repeating) byte offset header #19

Open c0d3z3r0 opened 4 months ago

c0d3z3r0 commented 4 months ago

Very often I find myself counting (horizontal) byte offsets. While the hex space option already helps a lot, it's still not optimal. I would love to see a header like in quickly hacked-together mockup:

image

A second option could enable repeating of that header at a defined offset, e.g. each 0x100 bytes.

image

The code would need to respect options like hex spacer, column count (probably the most difficult one), vertical split. Also, I'm not sure what the best behaviour would be when scrolling up/down.

8051Enthusiast commented 4 months ago

Sounds good! I was wondering how I'd deal with column counts that are not divisible by 16, but it seems that other hex editors like radare2 always just begin at 00 and go up from that instead of actually containing the last digits, which is the only sensible behavior in that case I guess.

Also, I'm not sure what the best behaviour would be when scrolling up/down.

Do you mean whether the secondary headers should scroll with the content or stay at the fixed position on the screen?

c0d3z3r0 commented 4 months ago

Also, I'm not sure what the best behaviour would be when scrolling up/down.

Do you mean whether the secondary headers should scroll with the content or stay at the fixed position on the screen?

Yep. Keeping it at a fixed position would require updating it (00 -> 10, 01 -> 11) or simply using x0, x1, x2 instead of 00, 01, .... Probably it's easier to let it move with the content?