-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed Hex mode width calculations in Viewer. #825
Fixed Hex mode width calculations in Viewer. #825
Conversation
Could you please give an example of an issue fixed by this change? |
Here is a problematic scenario:
Observe that the Far window is empty, and the Hex dump completely disappears. In fact, the dump now is far beyond the left edge of the window. One can argue that this issue is "by design," because the Viewer tries to preserve the horizontal position of the content while switching between view modes. However, the ostentatious intent of the existing code is to make sure the Hex dump is always visible. I think that the latter behavior is more important and should override "preserving horizontal position." Another concern is More importantly, I think that any particular visualization issue notwithstanding, it is plain wrong to have the width of Hex view hard coded to 80 columns in several places while the actual view width is variable. Last but not the least. I stumbled upon this issue while I was about to introduce a |
Also, some renaming and refactoring.
9ed1264
to
d79a327
Compare
|
I looked through sonarcloud's warnings. All of them are preexisting issues except for:
Let me know, if you want me to fix any of these issues, even preexisting. I'll do your bid. |
Please ignore those warnings. |
Ah yes, it's... tangled, to put it mildly. |
Thank you. |
The issue becomes visible when you use the mouse to select bytes in the Hex dump view. If the bytes-per-line are anything other than
You'll see that bytes Unfortunately, this issue is still present in version |
…tion Fixed fallout of 6304 (reported in gh-825).
Summary
Fixed a few places where the line width in the Viewer Hex mode was assumed to be 80 even though the number of bytes per line can now be changed by the user.
Also, some renaming and refactoring.
References
0ecc671
Checklist
If not checked, I accept that this work might be rejected in favor of a different great big ineffable plan.