Skip to content

Allow use of tab in editor panel, fix tab skipping tokens#578

Merged
Earthcomputer merged 3 commits into
FabricMC:masterfrom
Geolykt:tab-jump-next-token
Oct 19, 2025
Merged

Allow use of tab in editor panel, fix tab skipping tokens#578
Earthcomputer merged 3 commits into
FabricMC:masterfrom
Geolykt:tab-jump-next-token

Conversation

@Geolykt

@Geolykt Geolykt commented Oct 18, 2025

Copy link
Copy Markdown
Contributor

Also fixed running Enigma from an IDE such as eclipse (since it isn't a real bug per-se I don't think that it's worthy of its own PR and thus got shoved into this PR).

The tab skipping tokens aspect of this PR is caused when renaming very long references to short names. Previously it'd be searching for the next token in relation to the end of the obfuscated token, but now it does so in relation to the end of the renamed token.

All in all this is a less invasive fix than what I had initially planned (i.e. only handling tabbing logic in the ConvertingTextField), so there's no rewrite of components in this PR.

Comment thread enigma-swing/src/main/java/cuchaz/enigma/gui/panels/EditorPanel.java Outdated
Comment thread enigma-swing/src/main/java/cuchaz/enigma/gui/panels/EditorPanel.java Outdated

@Earthcomputer Earthcomputer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a little bit over-documented now but that's fine. I personally would have said something simpler like "make sure to call this when the tokens are up-to-date" ("damaged" is a bit of a weird word to use here). And then where invokeLater is actually used, add a comment to say that the tokens aren't up-to-date but will be inside the invokeLater.

@Earthcomputer
Earthcomputer merged commit 7cc1908 into FabricMC:master Oct 19, 2025
2 checks passed
@Geolykt
Geolykt deleted the tab-jump-next-token branch October 19, 2025 16:05
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.

2 participants