forked from zulip/zulip-terminal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core/boxes: Improve handling of pressing Esc during message compose.
Introduces variable MAX_MESSAGE_LENGTH_CONFIRMATION_POPUP to set a threshold for maximum length of message in compose box beyond which it prompts a confirmation popup instead of the current instant exit when Esc is pressed. This specifically avoids prompting for - message editing, rather than new compositions - when the message content is identical to the saved draft This adds a call to the recently added _set_default_footer_after_autocomplete() in the exit_compose_box() method, to reset the footer in case autocomplete was in use. However, the footer is currently always reset near the top of the keypress() method, before that point (see added TODO comment). This is since autocomplete does not correctly fully resume even if compose itself is resumed with the appropriate EXIT_COMPOSE exclusion near that TODO comment - the autocomplete state itself must also somehow be resumed for this to work. Tests added and updated. Fixes zulip#1342.
- Loading branch information
Showing
3 changed files
with
105 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters