Revision: 2865 http://geany.svn.sourceforge.net/geany/?rev=2865&view=rev Author: ntrel Date: 2008-08-08 14:33:23 +0000 (Fri, 08 Aug 2008)
Log Message: ----------- Fix using correct display tab width when the Tabs & Spaces indent type is set.
Modified Paths: -------------- trunk/ChangeLog trunk/src/printing.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-08-08 07:47:06 UTC (rev 2864) +++ trunk/ChangeLog 2008-08-08 14:33:23 UTC (rev 2865) @@ -1,3 +1,10 @@ +2008-08-08 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> + + * src/printing.c: + Fix using correct display tab width when the Tabs & Spaces indent + type is set. + + 2008-08-08 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/printing.c:
Modified: trunk/src/printing.c =================================================================== --- trunk/src/printing.c 2008-08-08 07:47:06 UTC (rev 2864) +++ trunk/src/printing.c 2008-08-08 14:33:23 UTC (rev 2865) @@ -470,6 +470,7 @@ gint page_nr, gpointer user_data) { DocInfo *dinfo = user_data; + GeanyEditor *editor; cairo_t *cr; gdouble width, height; gdouble x, y; @@ -480,6 +481,8 @@ if (dinfo == NULL || page_nr >= dinfo->n_pages) return;
+ editor = dinfo->doc->editor; + #ifdef GEANY_PRINT_DEBUG geany_debug("draw_page = %d, pages = %d, (real) lines_per_page = %d", page_nr, dinfo->n_pages, dinfo->lines_per_page); @@ -563,8 +566,8 @@ /* convert tabs to spaces which seems to be better than using Pango tabs */ if (c == '\t') { - const GeanyIndentPrefs *iprefs = editor_get_indent_prefs(dinfo->doc->editor); - gchar *s = g_strnfill(iprefs->width, ' '); + gint tab_width = sci_get_tab_width(editor->sci); + gchar *s = g_strnfill(tab_width, ' '); g_string_append(str, s); g_free(s); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.