Fix using correct display tab width when the Tabs & Spaces indent
type is set. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2865 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
19247c47b8
commit
664a1d77f0
@ -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:
|
||||
|
||||
@ -470,6 +470,7 @@ static void draw_page(GtkPrintOperation *operation, GtkPrintContext *context,
|
||||
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 @@ static void draw_page(GtkPrintOperation *operation, GtkPrintContext *context,
|
||||
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 @@ static void draw_page(GtkPrintOperation *operation, GtkPrintContext *context,
|
||||
/* 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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user