Non-auto function arguments of custom types defined inside a namespace
made the highlighter unable to check if member uses inside the function
are valid. Argument types were not parsed as fully qualified types and
the problem is corrected by making sure that fully qualified names are
used when they are found in function arguments.
An example of a pattern that shows the error is id3.hexpat in the which
uses unqualified types. In order to obtain the correct highlighting then
you have to add the namespace to all custom types even if they are being
used inside the namespace. Type names without namespace are considered
by the syntax highlighting code as belonging to the global scope
regardless of where the use takes place.
Currently, if you start a selection in the middle of a largish file and
without letting go of the left mouse key you place the mouse at the top
line of the hex editor view then the selection will expand upwards and
at some point the start of the selection will go out of view. If then
you move the cursor (without letting go of the left mouse button) to the
last line of the hex editor view you would expect that the end of the
selection would start to increase in value, but it does nothing instead.
A similar issue occurs at the other end.
The problem is that the code only allows the upward scrolling when
moving the smaller address end to the first line, but it should also
allow it when the bigger address end to the first line. This means that
it doesn't matter which of the two ends is larger and this code removes
the conditions on the relative sizes of the two ends allowing for
selection growth to reverse direction.
A recent commit broke the pattern editor popups for fin/replace and goto
line. The problem was cause by changes to the function that returns the
name of the currently focused subwindow using a function that only
updates when ImHex main window losses focus. The commit was aimed at
fixing evaluation of shortcuts in pattern data view and pattern editor
simultaneously but missed to fix some shortcuts like cut and paste.
The fix substitutes how the subwindow is first selected by using the
result of the subwindow selection used by imhex to insure that menus and
other ui components don't steal focus from views. The function that
returns the name of the current focused subwindow was changed to use
this value. This fixes both the window popups of pattern editor and all
the shortcut duplications.
When a project is loaded it is set to dirty without any changes so that
it goes through the steps that patterns with changes go through. The fix
uses a different starting step that doesn't set the dirty flags when
changing providers or loading projects.
<!--
Please provide as much information as possible about what your PR aims
to do.
PRs with no description will most likely be closed until more
information is provided.
If you're planing on changing fundamental behaviour or add big new
features, please open a GitHub Issue first before starting to work on
it.
If it's not something big and you still want to contact us about it,
feel free to do so !
-->
### Problem description
<!-- Describe the bug that you fixed/feature request that you
implemented, or link to an existing issue describing it -->
Hopefully this will help us debug the bugs that appear once ImHex
restarts a little easier.
### Screenshots
<!-- If your change is visual, take a screenshot showing it. Ideally,
make before/after sceenshots -->
<img width="372" height="182" alt="image"
src="https://github.com/user-attachments/assets/1f27443e-9eaa-465a-b545-c2bbf0b56ca4"
/>
``` rust
struct Rec : Rec {
};
```
Prevent infinite recursion in appendInheritances by erasing processed
inheritance entries during traversal, and safely iterate over
m_inheritances in appendInheritances to avoid
modification-during-iteration issues.
Co-authored-by: paxcut <53811119+paxcut@users.noreply.github.com>