1
0
mirror of synced 2025-01-09 05:01:38 +01:00
ImHex/plugins/builtin/include/content
paxcut 382a62343d
fix: Fixes for breakpoints (#1923)
WARNING: this PR won't compile unless [PR 132 from pattern language
repository](https://github.com/WerWolv/PatternLanguage/pull/132) is
merged first. Some changes here are shared by at least another PR to
this repository but there should not be any conflicts as the shared
changes are identical.

### Problem description
fix: Editing patterns with breakpoints sets behaves unexpectedly. As a
simple example, set a breakpoint and insert a blank line somewhere
before the breakpoint location. The breakpoint will appear to move but
in reality it hasn't. To see this set another breakpoint elsewhere in
the file and the old one will be displayed where it is really located
at.

The reason for this and many other problems with breakpoints is that
currently ImHex keeps two set of breakpoints in text editor and in
evaluator that are independent of each other, ie, changes to one don't
affect the other. This PR aims at synchronizing the two sets through the
per provider breakpoints that exist in view pattern editor.

### Implementation description

It accomplishes this by making the text editor version of breakpoints
the principal source of vectors and the ones in evaluator the effective
version. The first allows one to modify the text around and at the
breakpoint and notify others that the changes have induced changes in
the breakpoint locations. The effective breakpoints allow the insertion
and deletion of breakpoints.

View pattern editor is where breakpoints are updated. It receives
notifications from text editor about changes and then makes sure the
version in evaluator is updated with those changes. View pattern editor
also manages breakpoint addition and deletion so before making changes
it gets a copy of the current ones from text editor, sets the ones in
evaluator, uses the evaluator functions to add or delete breakpoints and
finally sets the text editor version with the new version.
2024-11-24 12:06:44 +01:00
..
export_formatters feat: Added CSV, TSV and JSON as export options for Find results (#1673) 2024-06-18 20:57:55 +00:00
helpers fix: Task names not displaying correctly anymore 2024-07-27 14:09:52 +02:00
popups impr: Make all task names properly translatable 2024-07-27 16:29:06 +02:00
providers impr: Allow files to be switched between memory loaded and direct access 2024-06-09 20:59:06 +02:00
views fix: Fixes for breakpoints (#1923) 2024-11-24 12:06:44 +01:00
command_line_interface.hpp feat: Added --reset-settings command 2024-06-26 19:38:25 +02:00
data_processor_nodes.hpp refactor: Split data processor nodes in several files (#1419) 2023-11-13 23:36:39 +01:00
global_actions.hpp impr: Make unsaved changes popup behave more like in other applications 2024-04-23 21:02:16 +02:00
recent.hpp feat: Draw info banner on welcome screen if one exists 2023-11-17 15:54:38 +01:00
tools_entries.hpp feat: Added simple HTTP request tool 2024-01-04 00:38:21 +01:00