SF.net SVN: geany:[3376] trunk/src/editor.c

ntrel at users.sourceforge.net ntrel at xxxxx
Mon Dec 15 16:30:54 UTC 2008


Revision: 3376
          http://geany.svn.sourceforge.net/geany/?rev=3376&view=rev
Author:   ntrel
Date:     2008-12-15 16:30:54 +0000 (Mon, 15 Dec 2008)

Log Message:
-----------
Use wrappers instead of SCI_LINEFROMPOSITION, SCI_BRACEMATCH.

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

Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c	2008-12-15 13:02:29 UTC (rev 3375)
+++ trunk/src/editor.c	2008-12-15 16:30:54 UTC (rev 3376)
@@ -253,7 +253,7 @@
 
 static void fold_symbol_click(ScintillaObject *sci, SCNotification *nt)
 {
-	gint line = SSM(sci, SCI_LINEFROMPOSITION, nt->position, 0);
+	gint line = sci_get_line_from_position(sci, nt->position);
 
 	SSM(sci, SCI_TOGGLEFOLD, line, 0);
 	/* extra toggling of child fold points
@@ -572,8 +572,8 @@
 static void ensure_range_visible(ScintillaObject *sci, gint posStart, gint posEnd,
 		gboolean enforcePolicy)
 {
-	gint lineStart = SSM(sci, SCI_LINEFROMPOSITION, MIN(posStart, posEnd), 0);
-	gint lineEnd = SSM(sci, SCI_LINEFROMPOSITION, MAX(posStart, posEnd), 0);
+	gint lineStart = sci_get_line_from_position(sci, MIN(posStart, posEnd));
+	gint lineEnd = sci_get_line_from_position(sci, MAX(posStart, posEnd));
 	gint line;
 
 	for (line = lineStart; line <= lineEnd; line++)
@@ -2695,7 +2695,7 @@
 			return;
 		}
 	}
-	end_pos = SSM(editor->sci, SCI_BRACEMATCH, brace_pos, 0);
+	end_pos = sci_find_matching_brace(editor->sci, brace_pos);
 
 	if (end_pos >= 0)
 	{


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