SF.net SVN: geany:[2945] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Mon Sep 15 12:49:51 UTC 2008


Revision: 2945
          http://geany.svn.sourceforge.net/geany/?rev=2945&view=rev
Author:   ntrel
Date:     2008-09-15 12:49:51 +0000 (Mon, 15 Sep 2008)

Log Message:
-----------
Apply patch from Jason Oster to highlight matching brace indent
guides (thanks, #2104099).

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

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2008-09-15 12:37:24 UTC (rev 2944)
+++ trunk/ChangeLog	2008-09-15 12:49:51 UTC (rev 2945)
@@ -3,6 +3,9 @@
  * src/editor.c:
    Show ellipsis (...) item when there are too many symbol names for
    autocompletion.
+ * src/editor.c:
+   Apply patch from Jason Oster to highlight matching brace indent
+   guides (thanks, #2104099).
 
 
 2008-09-14 Frank Lanitz  <frank(at)frank(dot)uvena(dot)de>

Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c	2008-09-15 12:37:24 UTC (rev 2944)
+++ trunk/src/editor.c	2008-09-15 12:49:51 UTC (rev 2945)
@@ -2482,6 +2482,7 @@
 		brace_pos++;
 		if (! utils_isbrace(sci_get_char_at(sci, brace_pos), editor_prefs.brace_match_ltgt))
 		{
+			SSM(sci, SCI_SETHIGHLIGHTGUIDE, 0, 0);
 			SSM(sci, SCI_BRACEBADLIGHT, (uptr_t)-1, 0);
 			return;
 		}
@@ -2489,9 +2490,16 @@
 	end_pos = SSM(sci, SCI_BRACEMATCH, brace_pos, 0);
 
 	if (end_pos >= 0)
+	{
+		gint col = MIN(sci_get_col_from_position(sci, brace_pos), sci_get_col_from_position(sci, end_pos));
+		SSM(sci, SCI_SETHIGHLIGHTGUIDE, col, 0);
 		SSM(sci, SCI_BRACEHIGHLIGHT, brace_pos, end_pos);
+	}
 	else
+	{
+		SSM(sci, SCI_SETHIGHLIGHTGUIDE, 0, 0);
 		SSM(sci, SCI_BRACEBADLIGHT, brace_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