SF.net SVN: geany: [2352] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Mon Mar 17 13:11:30 UTC 2008


Revision: 2352
          http://geany.svn.sourceforge.net/geany/?rev=2352&view=rev
Author:   eht16
Date:     2008-03-17 06:11:29 -0700 (Mon, 17 Mar 2008)

Log Message:
-----------
Fix broken auto multiline comment with files in CR/LF mode.

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

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2008-03-17 12:56:10 UTC (rev 2351)
+++ trunk/ChangeLog	2008-03-17 13:11:29 UTC (rev 2352)
@@ -1,6 +1,9 @@
 2008-03-17  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
 
- * doc/geany.txt, doc/geany.html: Add a note about column mode editing.
+ * doc/geany.txt, doc/geany.html:
+   Add a note about column mode editing.
+ * src/editor.c:
+   Fix broken auto multiline comment with files in CR/LF mode.
 
 
 2008-03-15  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>

Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c	2008-03-17 12:56:10 UTC (rev 2351)
+++ trunk/src/editor.c	2008-03-17 13:11:29 UTC (rev 2352)
@@ -65,7 +65,7 @@
 static void on_new_line_added(gint idx);
 static gboolean handle_xml(gint idx, gchar ch);
 static void get_indent(document *doc, gint pos, gboolean use_this_line);
-static void auto_multiline(ScintillaObject *sci, gint pos);
+static void auto_multiline(gint idx, gint pos);
 static gboolean is_comment(gint lexer, gint style);
 static void auto_close_bracket(ScintillaObject *sci, gint pos, gchar c);
 static void editor_auto_table(document *doc, gint pos);
@@ -467,7 +467,7 @@
 	if (editor_prefs.complete_snippets)
 	{
 		/* " * " auto completion in multiline C/C++/D/Java comments */
-		auto_multiline(sci, pos);
+		auto_multiline(idx, pos);
 
 		editor_auto_latex(idx, pos);
 	}
@@ -2026,9 +2026,10 @@
 }
 
 
-static void auto_multiline(ScintillaObject *sci, gint pos)
+static void auto_multiline(gint idx, gint pos)
 {
-	gint style = SSM(sci, SCI_GETSTYLEAT, pos - 2, 0);
+	ScintillaObject *sci = doc_list[idx].sci;
+	gint style = SSM(sci, SCI_GETSTYLEAT, pos - 1 - utils_get_eol_char_len(idx), 0);
 	gint lexer = SSM(sci, SCI_GETLEXER, 0, 0);
 	gint i;
 


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