This PR implements a neat little feature I missed - the ability to jump
to the next/previous differing byte, skipping the chunk of repeating
bytes. Very useful when you analyze a raw flash dump and want to skip
the large sections of `0x00`s/`0xFF`s.
Some implementation details worth validating:
- I wasn't sure what is the correct place to put the new menu entries
into. The possible candidates were `File -> Go to address...` and `Edit
-> Follow selection`. I chose the former, although the latter may be a
better fit since it already states that the action is related to the
selection. Overall, it may be a good moment to refine these menu entries
in general.
- I didn't add any tests since I'm not sure what is the project's policy
for those. Please let me know if I need to add some!
- I added the machine-generated translations for the new menu entries
which may be considered a questionable thing. Please let me know if
you're unhappy with those, I'll drop the commit.
Also, thanks for such a nice tool, I use it a lot and was glad to build
a new feature for it!
Added the ui namespace and broke the main rendering function into a set
of smaller functions. Reorganized the header code separating functions
into rough groups that eventually will be in separate files.
Also fixes two bugs:
1) error messages not staying visible
2) uncaught exception when struct name is duplicated.
A lot of the code using coordinates for start and end has been moved to
use Selections instead. Created more string manipulation code that uses
utf8 indices aka Coordinates directly. This makes implementing editing
functions easier by not having to go back and forth from string indices
to char indices and back. Currently, the substring, erase and []
operator support coordinates and str indices.
The error was caused when the search for the closing delimiter extended
past the last token in the sequence, which happened because the initial
increments before the loop starts were not being accounted for in the
loop ending condition. This was fixed by decrementing the limit of
possible steps to account for the initial steps taken.
Problem was that a recent commit allowed any subview window to become
the current subview with focus which also included the context menu
popup. The fix is to list all the subviews that can acquire focus so
that they are the only ones that will be detected by the menu condition.
I noticed that an earlier fix was missing parenthesis, so I checked a
file of a big size and used a segment size of 1 and only 3 digits were
being displayed in spite of needing 6.