aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--e-util/e-text-event-processor-emacs-like.c8
-rw-r--r--widgets/text/e-text-event-processor-emacs-like.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/e-util/e-text-event-processor-emacs-like.c b/e-util/e-text-event-processor-emacs-like.c
index bfba76885b..c369177f6a 100644
--- a/e-util/e-text-event-processor-emacs-like.c
+++ b/e-util/e-text-event-processor-emacs-like.c
@@ -303,14 +303,14 @@ e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventPro
break;
case GDK_Return:
case GDK_KP_Enter:
- if ((key.state & GDK_CONTROL_MASK) || (!tep->allow_newlines)) {
- command.action = E_TEP_ACTIVATE;
- command.position = E_TEP_SELECTION;
- } else {
+ if (tep->allow_newlines) {
command.action = E_TEP_INSERT;
command.position = E_TEP_SELECTION;
command.value = 1;
command.string = "\n";
+ } else {
+ command.action = E_TEP_ACTIVATE;
+ command.position = E_TEP_SELECTION;
}
break;
case GDK_Escape:
diff --git a/widgets/text/e-text-event-processor-emacs-like.c b/widgets/text/e-text-event-processor-emacs-like.c
index bfba76885b..c369177f6a 100644
--- a/widgets/text/e-text-event-processor-emacs-like.c
+++ b/widgets/text/e-text-event-processor-emacs-like.c
@@ -303,14 +303,14 @@ e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventPro
break;
case GDK_Return:
case GDK_KP_Enter:
- if ((key.state & GDK_CONTROL_MASK) || (!tep->allow_newlines)) {
- command.action = E_TEP_ACTIVATE;
- command.position = E_TEP_SELECTION;
- } else {
+ if (tep->allow_newlines) {
command.action = E_TEP_INSERT;
command.position = E_TEP_SELECTION;
command.value = 1;
command.string = "\n";
+ } else {
+ command.action = E_TEP_ACTIVATE;
+ command.position = E_TEP_SELECTION;
}
break;
case GDK_Escape: