SF.net SVN: geany:[4326] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Fri Oct 16 11:07:59 UTC 2009


Revision: 4326
          http://geany.svn.sourceforge.net/geany/?rev=4326&view=rev
Author:   ntrel
Date:     2009-10-16 11:07:49 +0000 (Fri, 16 Oct 2009)

Log Message:
-----------
Remove unnecessary line number margin padding.

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

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-10-16 00:53:00 UTC (rev 4325)
+++ trunk/ChangeLog	2009-10-16 11:07:49 UTC (rev 4326)
@@ -1,3 +1,9 @@
+2009-10-16  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/sciwrappers.c:
+   Remove unnecessary line number margin padding.
+
+
 2009-10-16  Lex Trotman  <elextr(at)gmail(dot)com>
 
  * src/build.c:

Modified: trunk/src/sciwrappers.c
===================================================================
--- trunk/src/sciwrappers.c	2009-10-16 00:53:00 UTC (rev 4325)
+++ trunk/src/sciwrappers.c	2009-10-16 11:07:49 UTC (rev 4326)
@@ -47,8 +47,13 @@
 		gint len = SSM(sci, SCI_GETLINECOUNT, 0, 0);
 		gint width;
 
-		g_snprintf(tmp_str, 15, "_%d%d", len, extra_width);
+		g_snprintf(tmp_str, 15, "_%d", len);
 		width = sci_text_width(sci, STYLE_LINENUMBER, tmp_str);
+		if (extra_width)
+		{
+			g_snprintf(tmp_str, 15, "%d", extra_width);
+			width += sci_text_width(sci, STYLE_LINENUMBER, tmp_str);
+		}
 		SSM(sci, SCI_SETMARGINWIDTHN, 0, width);
 		SSM(sci, SCI_SETMARGINSENSITIVEN, 0, FALSE); /* use default behaviour */
 	}


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