1
0
mirror of synced 2024-12-19 11:05:54 +01:00
ImHex/plugins/builtin/include/content
paxcut 866b956680
feat: Added per provider cursor position for the Pattern editor (#1861)
### Problem description
Currently, the pattern editor does not remember where the cursor is
located in each provider. For example, suppose you have 2 providers in
your project, and you scrolled down to line 200 in the first pattern to
make some changes and remembered that the code you want to insert is in
the second provider. Then you switch to the second provider, look for
the code and find it in line 235. Switch back to the first one, and you
are at the beginning of the file. So you again look for the line to edit
paste it to realize that it needs code a few lines before the place you
found it. You switch to the second provider, and you are at the top
again. This gets annoying very fast.

### Implementation description

This PR ensures that, when you return to the pattern in the editor for
any of the opened providers, the cursor will still be at the same place
it was when you switched to a different one. Each provider pattern saves
its cursor position and returns to it when you switch to that provider.
It does that by creating a PerProvider variable and using it when
providers are first opened to set it to the origin and when switching
providers it first saves the position of the old provider and then loads
and sets the saved position of the new provider.

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2024-09-15 15:28:37 +02: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 feat: Added per provider cursor position for the Pattern editor (#1861) 2024-09-15 15:28:37 +02: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