Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Unable to Remove Characters, Copy and Paste Characters in Bookmark Comments #2055

Open
1 task
Croculus opened this issue Jan 6, 2025 · 4 comments
Open
1 task
Labels
bug Something isn't working

Comments

@Croculus
Copy link

Croculus commented Jan 6, 2025

Operating System

Windows

What's the issue you encountered?

Whenever I make a comment on a bookmark, I am unable to delete characters from my comment (via backspace), nor can I copy/paste text into the comment.

How can the issue be reproduced?

Seems to be applicable for any bookmark I create across the file I am working on. To recreate, make a new bookmark, type some text, and try to use the backspace key.

ImHex Version

1.36.2

ImHex Build Type

  • Nightly or built from sources

Installation type

MSI

Additional context?

No response

@Croculus Croculus added the bug Something isn't working label Jan 6, 2025
@WerWolv
Copy link
Owner

WerWolv commented Jan 6, 2025

Hey, thanks for the report!
We removed the built-in shortcuts of the text editor with the latest release and made them into configurable ones but we apparently forgot about the text editors in the bookmarks.

@paxcut?

@paxcut
Copy link
Contributor

paxcut commented Jan 6, 2025

Bookmarks use the text editor? had no idea. what else uses it?

@WerWolv
Copy link
Owner

WerWolv commented Jan 6, 2025

They do yeah. The only other thing is the demangler I believe but that is read only

@paxcut
Copy link
Contributor

paxcut commented Jan 6, 2025

I thought the only place that wasn't write-only was the pattern editor. The demangler, the console and the http requests are all write-only so they don't need shortcuts.I'll add them to the bookmarks but I wonder why is the text editor being used there at all.

paxcut added a commit to paxcut/ImHex that referenced this issue Jan 6, 2025
Added the registrations for the editor shortcuts and reorganized the registration calls into events and handlers.

Needed a way to select which of the possibly multiple editors sees the effects of the keyboard so a pointer to the current text editor in use was added to the view bookmarks class. The pointer may be empty so the shortcuts need to check it before using it.

To detect which of the editors needs to see the effects of the shortcuts a function ws added to text editor that tells if window has focus.

To avoid errors when editors become read only, asserts were exchanged with do-nothing early returns on the text editor.

To avoid using the default language coloring (HLSL), the colorize enabling variable was set to false.

A suggestion by cppcheck simplified the logic of a conditional on view bookmarks.

On view pattern editor some icons were added to console menu entries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants