[anjuta/gnome-2-32] python-support: Fix bgo#631223 autointention causes anjuta to hang



commit 96960aa1fd5ee53e04e13ee9d544f836eabb15fe
Author: Johannes Schmid <jhs gnome org>
Date:   Sun Oct 3 14:42:47 2010 +0200

    python-support: Fix bgo#631223 autointention causes anjuta to hang
    
    It was caused by calling ianjuta_editor_line_end_position with negative line values.

 plugins/language-support-python/plugin.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/language-support-python/plugin.c b/plugins/language-support-python/plugin.c
index d839c2d..1ab10a5 100644
--- a/plugins/language-support-python/plugin.c
+++ b/plugins/language-support-python/plugin.c
@@ -743,7 +743,7 @@ get_line_indentation_base (PythonPlugin *plugin,
 	else
 	{
 		gint line = currentline;
-		while (is_spaces_only(editor, line))
+		while (is_spaces_only(editor, line) && line >= 0)
 			line--;
 		line_indent = get_line_indentation (editor, line);
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]