fix: Bookmark comment shortcuts (issue #2055) #2056
+381
−198
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes for #2055.
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.