bugfix: core: Do not exit editor mode when narrowing. #1206
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.
What does this PR do?
These unrelated aspects being tied together was not an issue previously,
when narrowing was always done outside of compose. However, with
integration of #1194 as 2195904 this is no longer the case, so this is
required to ensure that narrowing does not prematurely end editor mode,
since otherwise container widgets would steal keypresses.
This may be improved later through further refactoring of the keypress
handling.
Tested?
Notes & Questions
Everything appears to work fine; as per commit description, we should fix this more cleanly with the keypress refactoring. See #zulip-terminal > Keypress refactoring
Interactions
This resolves an issue triggered by #1194, but which was present previously and only triggered by this situation.