diff --git a/src/viewer/text/form.c b/src/viewer/text/form.c index 9cd2bc529..d1b827c9f 100644 --- a/src/viewer/text/form.c +++ b/src/viewer/text/form.c @@ -1395,7 +1395,8 @@ field_op(struct session *ses, struct document_view *doc_view, if_assert_failed return FRAME_EVENT_OK; if (fc->mode == FORM_MODE_DISABLED || ev->ev != EVENT_KBD - || ses->insert_mode == INSERT_MODE_OFF) + || (ses->insert_mode == INSERT_MODE_OFF + && !(get_kbd_modifier(ev) & KBD_MOD_PASTE))) return FRAME_EVENT_IGNORED; action_id = kbd_action(KEYMAP_EDIT, ev, NULL); diff --git a/src/viewer/text/view.c b/src/viewer/text/view.c index 1ba334696..0dcc8361e 100644 --- a/src/viewer/text/view.c +++ b/src/viewer/text/view.c @@ -1065,9 +1065,7 @@ try_form_insert_mode(struct session *ses, struct document_view *doc_view, action_id = kbd_action(KEYMAP_EDIT, ev, NULL); if (ses->insert_mode == INSERT_MODE_OFF) { - if (action_id == ACT_EDIT_ENTER - || (action_id == -1 - && check_kbd_modifier(ev, KBD_MOD_PASTE))) { + if (action_id == ACT_EDIT_ENTER) { ses->insert_mode = INSERT_MODE_ON; status = FRAME_EVENT_REFRESH; }