SF.net SVN: geany: [1516] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Tue May 8 17:45:55 UTC 2007


Revision: 1516
          http://svn.sourceforge.net/geany/?rev=1516&view=rev
Author:   ntrel
Date:     2007-05-08 10:45:54 -0700 (Tue, 08 May 2007)

Log Message:
-----------
Fix auto-indentation when the filetype is not set.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/sci_cb.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-05-08 17:13:22 UTC (rev 1515)
+++ trunk/ChangeLog	2007-05-08 17:45:54 UTC (rev 1516)
@@ -1,3 +1,9 @@
+2007-05-08  Nick Treleaven  <nick.treleaven at btinternet.com>
+
+ * src/sci_cb.c:
+   Fix auto-indentation when the filetype is not set.
+
+
 2007-05-08  Enrico Tröger  <enrico.troeger at uvena.de>
 
  * src/sciwrappers.c, src/sciwrappers.h:

Modified: trunk/src/sci_cb.c
===================================================================
--- trunk/src/sci_cb.c	2007-05-08 17:13:22 UTC (rev 1515)
+++ trunk/src/sci_cb.c	2007-05-08 17:45:54 UTC (rev 1516)
@@ -363,8 +363,6 @@
 {
 	gint pos = sci_get_current_position(sci);
 
-	if (doc_list[idx].file_type == NULL) return;
-
 	// simple indentation
 	if (doc_list[idx].use_auto_indention)
 	{
@@ -374,7 +372,7 @@
 		if (app->pref_editor_indention_mode == INDENT_ADVANCED)
 		{
 			// add extra indentation for Python after colon
-			if (doc_list[idx].file_type->id == GEANY_FILETYPES_PYTHON &&
+			if (FILETYPE_ID(doc_list[idx].file_type) == GEANY_FILETYPES_PYTHON &&
 				sci_get_char_at(sci, pos - 2) == ':' &&
 				sci_get_style_at(sci, pos - 2) == SCE_P_OPERATOR)
 			{


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list