diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-10-03 03:27:47 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-10-03 03:27:47 +0800 |
commit | 8f6ee6cb9b3292a91ac783c25508a701d34400f9 (patch) | |
tree | abd63eff6a91ac8943a74b23f4475e02b6fc0933 | |
parent | 1057efd639f0f3f0cef84fb492ef4b6bc4bd8bce (diff) | |
download | gsoc2013-evolution-8f6ee6cb9b3292a91ac783c25508a701d34400f9.tar.gz gsoc2013-evolution-8f6ee6cb9b3292a91ac783c25508a701d34400f9.tar.zst gsoc2013-evolution-8f6ee6cb9b3292a91ac783c25508a701d34400f9.zip |
Don't handle control-enter if allow_newlines is off. Fixes Ximian bug
2001-10-02 Christopher James Lahey <clahey@ximian.com>
* gal/util/e-text-event-processor-emacs-like.c
(e_text_event_processor_emacs_like_event): Don't handle
control-enter if allow_newlines is off. Fixes Ximian bug #3742.
svn path=/trunk/; revision=13345
-rw-r--r-- | e-util/e-text-event-processor-emacs-like.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/e-util/e-text-event-processor-emacs-like.c b/e-util/e-text-event-processor-emacs-like.c index f3077ae42f..652e4b9ff6 100644 --- a/e-util/e-text-event-processor-emacs-like.c +++ b/e-util/e-text-event-processor-emacs-like.c @@ -306,13 +306,23 @@ e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventPro case GDK_Return: case GDK_KP_Enter: if (tep->allow_newlines) { - command.action = E_TEP_INSERT; - command.position = E_TEP_SELECTION; - command.value = 1; - command.string = "\n"; + if (key.state & GDK_CONTROL_MASK) { + command.action = E_TEP_ACTIVATE; + command.position = E_TEP_SELECTION; + } else { + 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; + if (key.state & GDK_CONTROL_MASK) { + command.action = E_TEP_NOP; + command.position = E_TEP_SELECTION; + } else { + command.action = E_TEP_ACTIVATE; + command.position = E_TEP_SELECTION; + } } break; case GDK_Escape: |