[gnome-builder] auto-indent-xml: don't do indent on Return if Shift is pressed.
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] auto-indent-xml: don't do indent on Return if Shift is pressed.
- Date: Wed, 7 Jan 2015 09:25:45 +0000 (UTC)
commit 0bebb08a724ba2520f9f66cd850937a04d7cb62f
Author: Christian Hergert <christian hergert me>
Date: Wed Jan 7 01:24:06 2015 -0800
auto-indent-xml: don't do indent on Return if Shift is pressed.
src/auto-indent/gb-source-auto-indenter-xml.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/auto-indent/gb-source-auto-indenter-xml.c b/src/auto-indent/gb-source-auto-indenter-xml.c
index 255c6aa..2e75d95 100644
--- a/src/auto-indent/gb-source-auto-indenter-xml.c
+++ b/src/auto-indent/gb-source-auto-indenter-xml.c
@@ -357,8 +357,10 @@ gb_source_auto_indenter_xml_format (GbSourceAutoIndenter *indenter,
{
case GDK_KEY_Return:
case GDK_KEY_KP_Enter:
- return gb_source_auto_indenter_xml_indent (xml, begin, end, cursor_offset,
- tab_width);
+ if ((trigger->state & GDK_SHIFT_MASK) == 0)
+ return gb_source_auto_indenter_xml_indent (xml, begin, end, cursor_offset,
+ tab_width);
+ return NULL;
case GDK_KEY_slash:
return gb_source_auto_indenter_xml_maybe_unindent (xml, begin, end);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]