[gnome-builder] python: its for .. else, not while .. else.
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] python: its for .. else, not while .. else.
- Date: Sun, 11 Jan 2015 11:51:06 +0000 (UTC)
commit 6722eb7fa6ccffb9d86be521f8266cb680781a21
Author: Christian Hergert <christian hergert me>
Date: Sun Jan 11 03:50:59 2015 -0800
python: its for .. else, not while .. else.
src/auto-indent/gb-source-auto-indenter-python.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/auto-indent/gb-source-auto-indenter-python.c
b/src/auto-indent/gb-source-auto-indenter-python.c
index 29fb196..6c77970 100644
--- a/src/auto-indent/gb-source-auto-indenter-python.c
+++ b/src/auto-indent/gb-source-auto-indenter-python.c
@@ -554,9 +554,9 @@ maybe_unindent_else_or_elif (GbSourceAutoIndenterPython *python,
{
/*
* TODO: This doesn't handle unindent properly for multi line
- * if or while statements.
+ * if or for blocks.
*/
- while (!(line_starts_with (©, "if ") || line_starts_with (©, "while ")) ||
+ while (!(line_starts_with (©, "if ") || line_starts_with (©, "for ")) ||
!line_ends_with (©, ":"))
{
guint if_line;
@@ -573,7 +573,7 @@ maybe_unindent_else_or_elif (GbSourceAutoIndenterPython *python,
break;
}
- if ((line_starts_with (©, "if ") || line_starts_with (©, "while ")) &&
+ if ((line_starts_with (©, "if ") || line_starts_with (©, "for ")) &&
line_ends_with (©, ":"))
{
gtk_text_iter_set_line_offset (begin,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]