1
0
mirror of synced 2024-11-14 11:07:43 +01:00
ImHex/plugins/builtin
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
..
include/content feat: Added per provider cursor position for the Pattern editor (#1861) 2024-09-15 15:28:37 +02:00
romfs feat: Added a quarter precision (8 bits) button to IEEE 745 tool (#1868) 2024-09-15 15:22:35 +02:00
source feat: Added per provider cursor position for the Pattern editor (#1861) 2024-09-15 15:28:37 +02:00
tests tests: Add infrastructure for testing plugins (#1538) 2024-02-26 20:51:08 +01:00
CMakeLists.txt impr: Handle demangling of identifiers without leading underscore 2024-07-11 20:38:22 +02:00