anjuta r3772 - in branches/anjuta-2-4: . plugins/language-support-cpp-java



Author: jhs
Date: Wed Mar 12 09:05:09 2008
New Revision: 3772
URL: http://svn.gnome.org/viewvc/anjuta?rev=3772&view=rev

Log:
2008-03-12  Johannes Schmid  <jhs gnome org>

	* plugins/language-support-cpp-java/plugin.c (extract_mode_line),
	(get_line_indentation_base):
	
	#521847 â anjuta freez when edit file



Modified:
   branches/anjuta-2-4/ChangeLog
   branches/anjuta-2-4/plugins/language-support-cpp-java/plugin.c

Modified: branches/anjuta-2-4/plugins/language-support-cpp-java/plugin.c
==============================================================================
--- branches/anjuta-2-4/plugins/language-support-cpp-java/plugin.c	(original)
+++ branches/anjuta-2-4/plugins/language-support-cpp-java/plugin.c	Wed Mar 12 09:05:09 2008
@@ -555,7 +555,7 @@
 		/* Check for escape characters */
 		while (end_modeline)
 		{
-			 if ((end_modeline - 1) != "\\")
+			 if (!g_str_equal ((end_modeline - 1), "\\"))
 				break;
 			end_modeline++;
 			end_modeline = strstr (end_modeline, ":");
@@ -563,7 +563,7 @@
 		if (end_modeline)
 		{
 			gchar* vim_modeline = g_strndup (begin_modeline, end_modeline - begin_modeline);
-      *vim = TRUE;
+			*vim = TRUE;
 			return vim_modeline;
 		}
 	}
@@ -889,16 +889,22 @@
 				}
 				if (c == '/')
 				{
-					if (!ianjuta_iterable_previous (new_iter, NULL))
+					IAnjutaIterable* tmp_iter = ianjuta_iterable_clone (new_iter, NULL);
+					if (!ianjuta_iterable_previous (tmp_iter, NULL))
+					{
+						g_object_unref (tmp_iter);
 						break;
-					c = ianjuta_editor_cell_get_char (IANJUTA_EDITOR_CELL (new_iter), 0,
+					}
+					c = ianjuta_editor_cell_get_char (IANJUTA_EDITOR_CELL (tmp_iter), 0,
 													  NULL);
 					if (c == '/')
 					{
 						/* is a line comment, skip until begin of comment */
 						comment = TRUE;
+						g_object_unref (tmp_iter);
 						break;
 					}
+					g_object_unref (tmp_iter);
 				}
 			} while (ianjuta_iterable_previous (new_iter, NULL));
 			if (comment)



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