mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 08:56:10 +00:00
compose: Clean code to fix up hotkey to edit previous message.
This is a follow up to 875ad8e implementing a better approach. We call
`cursor_at_start_of_whitespace_in_compose` from `focus_in_empty_compose`
itself if and when needed.
This commit is contained in:
@@ -732,8 +732,7 @@ export function process_hotkey(e, hotkey) {
|
||||
((event_name === "down_arrow" || event_name === "page_down" || event_name === "end") &&
|
||||
compose_state.focus_in_empty_compose()) ||
|
||||
((event_name === "up_arrow" || event_name === "page_up" || event_name === "home") &&
|
||||
(compose_state.focus_in_empty_compose() ||
|
||||
compose_state.cursor_at_start_of_whitespace_in_compose()))
|
||||
compose_state.focus_in_empty_compose(true))
|
||||
) {
|
||||
compose_actions.cancel();
|
||||
// don't return, as we still want it to be picked up by the code below
|
||||
|
||||
Reference in New Issue
Block a user