Skip to content

Comments

Small fixes and improvements for InfoPane's key event handling#3267

Merged
dmaluka merged 5 commits intomicro-editor:masterfrom
dmaluka:dokeyevent-improvements
Apr 25, 2024
Merged

Small fixes and improvements for InfoPane's key event handling#3267
dmaluka merged 5 commits intomicro-editor:masterfrom
dmaluka:dokeyevent-improvements

Conversation

@dmaluka
Copy link
Collaborator

@dmaluka dmaluka commented Apr 24, 2024

See commit messages for detailed descriptions.

dmaluka added 5 commits April 24, 2024 22:51
It is not really defined what is the meaning of this return value.
Currently this value is always true. And even if this value actually
meant something (for example, the result of the last executed action
in the chain), we should not use this value in HandleEvent(). The key
event handling logic should behave the same regardless of whether the
action triggered by this key succeeded or not.
The return value of DoKeyEvent() has a dual meaning, which makes the
code not obvious and confusing. So at least document it.
Fix the following buggy behavior:

1. bind "<n><a>" to the Paste action in the command bar
2. open a split pane, type some text and press Ctrl-q to close it
3. answer "n" to the "Save changes before closing?" prompt
4. press Ctrl-e to open the command prompt and press "a"

-> result: instead of inserting the "a" letter, clipboard is pasted.
@dmaluka dmaluka merged commit ff5b147 into micro-editor:master Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants