Commit Graph

215 Commits

Author SHA1 Message Date
WerWolv 6b16f39be4 impr: Allow tutorials to use markdown formatted text 2025-12-15 20:07:43 +01:00
paxcut 1676342e28
Various fixes for pattern editor (#2561)
- Fix for vertical scroll bar being too far to the left.
- Fix constructor not initializing from const char pointer properly
- maxcolumn not being set for console text lines causing crashes on
empty pattern evaluation
- A replacement using replace all is now undone in one step.
- Find/replace no longer need to have enter or return key to accept
text. You can use arrows or shortcuts.
- More efficient search replace implementation with plans to add even
faster.
- Tooltips added to find/replace window
- Providers now save both horizontal and vertical scroll positions when
switching to another one and restore them when switching back. This is
independent to the cursor position which is also saved.
- Pattern editor no longer takes focus when changing providers via a tab
click. This has the effect that menus won't change by just clicking on a
tab.
- Small fixes and code refactoring.
2025-12-13 05:23:16 -07:00
WerWolv 62732de227 fix: Gaps in-between hex editor highlighting on specific scalings 2025-12-12 22:04:15 +01:00
WerWolv ab95cdf3e5 fix: Minimap not allowing scrolling as far as the scroll bar 2025-12-12 17:19:57 +01:00
paxcut bfa9788099
impr: Various fixes and improvements to the pattern editor (#2559)
- fixed crash when utf8 chars were present in text editor
- fixed unable to scroll when cursor at line 1
- removed dependencies on thext editor that were not being used.

I had to go back to the old code (old for me) and fit in the changes
that were applied to the new code.That was only possible by
incorporating some of the new structural differences to the text editor.
This created new bugs and crashes that I ve have fixed but there may be
ones that I couldn't find in the very small amount of time I could spend
testing so that this commit wouldn't be delayed. If more crashes are
found due to the mixing of old and new code they should be resolved when
the new code is brought in.
2025-12-12 16:27:26 +01:00
WerWolv 6427f53b5a feat: Add endian option to Sum hash 2025-12-07 22:18:34 +01:00
WerWolv 95f010395c fix: Pressing enter while in insert mode not behaving correctly 2025-12-06 16:11:28 +01:00
WerWolv da755ec75b feat: Added pattern context menu for copy and edit 2025-12-01 21:25:57 +01:00
WerWolv 1ab1f7ada0 fix: Comparison between literal and optional 2025-12-01 20:35:55 +01:00
WerWolv f4753a5bd8
feat: Added hex editor minimap option to shade cells based on the byte's value 2025-12-01 19:37:36 +01:00
WerWolv 980438008c
fix: Crashes and usability issues with the pattern tree filter 2025-12-01 19:35:22 +01:00
WerWolvTranslationBot 58eec483c9
lang: Translations update from Weblate (#2480)
Translations update from [Weblate](https://weblate.werwolv.net) for
[ImHex/Builtin](https://weblate.werwolv.net/projects/imhex/builtin/).


It also includes following components:

* [ImHex/Diffing](https://weblate.werwolv.net/projects/imhex/diffing/)

* [ImHex/UI](https://weblate.werwolv.net/projects/imhex/ui/)

*
[ImHex/Disassembler](https://weblate.werwolv.net/projects/imhex/disassembler/)

* [ImHex/Yara
Rules](https://weblate.werwolv.net/projects/imhex/yara-rules/)

* [ImHex/Fonts](https://weblate.werwolv.net/projects/imhex/fonts/)

* [ImHex/Hashes](https://weblate.werwolv.net/projects/imhex/hashes/)

* [ImHex/Remote](https://weblate.werwolv.net/projects/imhex/remote/)

* [ImHex/Script
Loader](https://weblate.werwolv.net/projects/imhex/script-loader/)

*
[ImHex/Visualizers](https://weblate.werwolv.net/projects/imhex/visualizers/)

* [ImHex/Windows](https://weblate.werwolv.net/projects/imhex/windows/)



Current translation status:

![Weblate translation
status](https://weblate.werwolv.net/widgets/imhex/-/builtin/horizontal-auto.svg)

Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: liushuyu <liushuyu011@gmail.com>
2025-11-29 13:02:09 +01:00
WerWolvTranslationBot d3896ccfda
lang: Added Ukrainian language (#2444)
Translation by @RutarAndriy
Translations update from [Weblate](https://weblate.werwolv.net) for
[ImHex/Builtin](https://weblate.werwolv.net/projects/imhex/builtin/).


It also includes following components:

* [ImHex/Diffing](https://weblate.werwolv.net/projects/imhex/diffing/)

* [ImHex/Yara
Rules](https://weblate.werwolv.net/projects/imhex/yara-rules/)

*
[ImHex/Disassembler](https://weblate.werwolv.net/projects/imhex/disassembler/)

* [ImHex/Fonts](https://weblate.werwolv.net/projects/imhex/fonts/)

* [ImHex/Hashes](https://weblate.werwolv.net/projects/imhex/hashes/)

* [ImHex/Remote](https://weblate.werwolv.net/projects/imhex/remote/)

* [ImHex/Script
Loader](https://weblate.werwolv.net/projects/imhex/script-loader/)

* [ImHex/UI](https://weblate.werwolv.net/projects/imhex/ui/)

*
[ImHex/Visualizers](https://weblate.werwolv.net/projects/imhex/visualizers/)

* [ImHex/Windows](https://weblate.werwolv.net/projects/imhex/windows/)



Current translation status:

![Weblate translation
status](https://weblate.werwolv.net/widgets/imhex/-/builtin/horizontal-auto.svg)

Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: Rutar Andriy <RutarAndriy@gmail.com>
2025-09-17 20:52:24 +02:00
Zackary Newman 67efea6444
Fix segfault when opening recent file with pattern sync; Don't show p… (#2448)
…attern selection popup when pattern is already open

This PR does two things. Most importantly, it fixes a segfault that can
be caused by opening a recent file with pattern sync enabled.
Secondly, it makes it so that the pattern selection popup does not
appear if you already have text in the pattern editor for a given
provider (due to CLI args, a project file, pattern sync, etc.). If you
open a file normally, that text field is empty and the popup will appear
so you can select a pre-made pattern like usual.
2025-09-13 21:10:38 -07:00
WerWolv 3c661842a2 lang: Added empty files for Ukrainian 2025-09-12 22:15:10 +02:00
WerWolv 920578003e lang: Added skeleton structure for Ukrainian language
#2443
2025-09-12 21:55:53 +02:00
Shadow775711 d7a830ca95
lang: Update Polish translation (#2420)
Unfortunately, I had to create a new fork and branch because GitHub kept
rejecting my push due to the workflow files (nightly_release.yml and
release.yml), even though they were not intentionally modified.

I only made changes in two language files and added a helper script
Formatter.py.

Please test if everything works correctly in the interface.

Thanks for the project, and I’m happy to help further if needed.

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2025-09-11 20:10:53 +02:00
WerWolv c1619820c7 impr: Jump to top of selection instead of the bottom
Fixes #2354
2025-09-10 20:50:27 +02:00
WerWolv a0326c4371 impr: Properly align buttons in pattern data view 2025-09-08 19:52:12 +02:00
paxcut d08853df8c
fix: No scrolling on jumping to error source. (#2438)
When I implemented the changes to allow creating breakpoints without
losing focus in the pattern editor and without forcing it to scroll to
the cursor position I broke the code that ensures the cursor is visible
after being moved to the source code that caused the error. All I needed
to do is to explicitly set the argument because the default is to not
scroll to the cursor when focus is given to the pattern editor
2025-09-07 12:31:09 -07:00
paxcut d8dd287cdf
fix: Fixed ImHex crashing when using ctrl-backspace on empty file. (#2433)
Editor was attempting to delete non-existent chars which is UB. Fixed by
checking before deleting. Also fixed was a problem created by having to
press enter to change the search string which advanced the selection to
the first match. In the next step one would expect that pressing enter
on the replace field would replace the selected item but was replacing
the item found after he first.

This was fixed by always replacing the current selection first. If the
replacement is the same as the searched term then replacing won't
advance the cursor, but if they are different then the current match
will no longer exist so it would search fora new one.
2025-09-05 02:28:11 -07:00
paxcut d62b64c27a
Fixes for next release. (#2430)
I forgot I also had comments switched to italics done easily thanks to
WerWolv's addition that lets you push and pop them.
2025-09-02 17:29:33 -07:00
paxcut 52952652de
Fixes for next release. (#2429)
Attempt to fix WerWolv's strange off by one problem when using the
mouse. Added a popup question for files that contain long lines (>1024
bytes). Also improved the handling of large lines, so it won't stall the
app. May also contain other smaller issue fixes.
2025-09-02 15:30:50 -07:00
WerWolv 715e970d99 fix: Last column in text editor not being selectable 2025-08-31 16:59:40 +02:00
paxcut c8caf6124e
Fix: Very long lines in text editor could make it hang. (#2426)
Fixed by only processing text that's visible.

Also fixed the cursor jumping to breakpoint line when selected by
clicking the line number and added highlighting of the current editing
line. An optimization that caches the number of utf-8 chars in each line
was included as well.
Finally, an error that caused ImHex to crash if a pattern was saved as
itself was also fixed.
2025-08-30 20:01:05 -07:00
WerWolv a063eb96c6 fix: Markdown elements overflowing window width 2025-08-27 21:27:47 +02:00
WerWolv c1a14cb4d4 impr: Ensure that wrapped text doesn't end up wrapping at every character 2025-08-25 21:22:43 +02:00
WerWolv 0178ba014a fix: Region picker widget overflowing in many views 2025-08-24 16:29:36 +02:00
WerWolvTranslationBot 013fa85c1c
lang: Updated localization (#2412)
Translations update from [Weblate](https://weblate.werwolv.net) for
[ImHex/Builtin](https://weblate.werwolv.net/projects/imhex/builtin/).


It also includes following components:

* [ImHex/Diffing](https://weblate.werwolv.net/projects/imhex/diffing/)

* [ImHex/Yara
Rules](https://weblate.werwolv.net/projects/imhex/yara-rules/)

*
[ImHex/Disassembler](https://weblate.werwolv.net/projects/imhex/disassembler/)

* [ImHex/Fonts](https://weblate.werwolv.net/projects/imhex/fonts/)

* [ImHex/Hashes](https://weblate.werwolv.net/projects/imhex/hashes/)

* [ImHex/Remote](https://weblate.werwolv.net/projects/imhex/remote/)

* [ImHex/Script
Loader](https://weblate.werwolv.net/projects/imhex/script-loader/)

* [ImHex/UI](https://weblate.werwolv.net/projects/imhex/ui/)

*
[ImHex/Visualizers](https://weblate.werwolv.net/projects/imhex/visualizers/)

* [ImHex/Windows](https://weblate.werwolv.net/projects/imhex/windows/)



Current translation status:

![Weblate translation
status](https://weblate.werwolv.net/widgets/imhex/-/builtin/horizontal-auto.svg)

Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: OctopuSSX <vladik0701@gmail.com>
2025-08-24 13:07:16 +02:00
Nik d012ad08f8
feat: Added proper Markdown renderer (#2415) 2025-08-20 20:37:44 +02:00
WerWolv fbde2942de build: Refactor ContentRegistry into multiple separate files 2025-08-14 21:22:03 +02:00
WerWolv d920718b44 build: Refactor ImHexAPI into multiple separate files 2025-08-14 20:16:40 +02:00
WerWolv 50b25882cd fix: MSVC build errors 2025-08-12 19:21:00 +02:00
WerWolv b5a3a8b4c2 impr: Rewrite Localization Manager to use more standard format and load localizations on the fly 2025-08-12 18:00:10 +02:00
WerWolv 25c8f4b588 fix: Jump to certain array-member patterns not working
Fixes #2398
2025-08-11 21:46:47 +02:00
WerWolv 09b2e20a3d impr: Save most of the hex editor settings
#2398
2025-08-11 21:03:18 +02:00
paxcut 50f1fe2b2d
improv: moved text editor to the ui plugin. (#2397)
Reorganized source code into files named in the fashion of imhex and
split large functions into smaller ones. Moved all function definitions
out of the header except for one-liners. All variable types were
switched to use imHex standard (u8,...) and removed duplicated functions
that were needed when the text editor was isolated.

Minor improvements to find/replace while making sure they still worked
with utf-8 chars.
2025-08-10 14:35:21 -07:00
WerWolv 80003a4843 impr: Condense and modernize find view 2025-08-10 20:04:36 +02:00
WerWolv d683c04519 fix: ID and layout issues with static array members in the pattern data view
Fixes #2393
2025-08-09 14:09:32 +02:00
WerWolv 9cff9043ee impr: Remove hex::format, improve format and logging type safety 2025-08-06 20:02:23 +02:00
paxcut d429424f67
improv: refactor text editor to follow imhex style. (#2382)
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.
2025-08-06 01:01:07 -07:00
WerWolv e05825b9f4 feat: Added extended/unprintable ASCII character display toggle to hex editor 2025-08-05 23:33:02 +02:00
WerWolv baebfe96ba impr: Make banners easier to read 2025-08-05 22:19:04 +02:00
WerWolv 95465e2fc3 fix: Tree expand working differently for favorites and static arrays in the pattern data view 2025-08-05 17:57:59 +02:00
paxcut 56d1e2670e
fix: segment numbers are still being cutoff. (#2370)
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.
2025-08-02 23:44:35 -07:00
WerWolv 29354f0bcb fix: Hex Editor segment numbers being cut off 2025-08-02 17:30:49 +02:00
WerWolv 83d92dde35 build: Update VSCode Icons font 2025-07-30 23:17:13 +02:00
WerWolv be6a90675b fix: Some cell visualizer types not updating their values correctly 2025-07-26 11:58:30 +02:00
WerWolv e0180b718f feat: Added simplified pattern value editor 2025-07-24 23:29:13 +02:00
WerWolv 0e720a1e02 fix: Hex editor insert mode inserting or removing too many bytes 2025-07-24 19:28:46 +02:00