SF.net SVN: geany:[2862] branches/custom-tab-width
ntrel at users.sourceforge.net
ntrel at xxxxx
Thu Aug 7 15:32:57 UTC 2008
Revision: 2862
http://geany.svn.sourceforge.net/geany/?rev=2862&view=rev
Author: ntrel
Date: 2008-08-07 15:32:56 +0000 (Thu, 07 Aug 2008)
Log Message:
-----------
Fix using editor_get_indent_prefs().
Modified Paths:
--------------
branches/custom-tab-width/ChangeLog
branches/custom-tab-width/plugins/export.c
Modified: branches/custom-tab-width/ChangeLog
===================================================================
--- branches/custom-tab-width/ChangeLog 2008-08-07 15:30:52 UTC (rev 2861)
+++ branches/custom-tab-width/ChangeLog 2008-08-07 15:32:56 UTC (rev 2862)
@@ -10,6 +10,8 @@
Add editor_get_indent_prefs() to the API.
Make editor_get_indent_prefs() return default prefs if editor is
NULL.
+ * plugins/export.c:
+ Fix using editor_get_indent_prefs().
2008-08-05 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: branches/custom-tab-width/plugins/export.c
===================================================================
--- branches/custom-tab-width/plugins/export.c 2008-08-07 15:30:52 UTC (rev 2861)
+++ branches/custom-tab-width/plugins/export.c 2008-08-07 15:32:56 UTC (rev 2862)
@@ -347,6 +347,7 @@
static void write_latex_file(GeanyDocument *doc, const gchar *filename, gboolean use_zoom)
{
+ GeanyEditor *editor = doc->editor;
gint i, style = -1, old_style = 0, column = 0;
gchar c, c_next, *tmp;
/* 0 - fore, 1 - back, 2 - bold, 3 - italic, 4 - font size, 5 - used(0/1) */
@@ -408,8 +409,8 @@
}
case '\t':
{
- gint tab_stop = geany->editor_prefs->tab_width -
- (column % geany->editor_prefs->tab_width);
+ gint tab_width = p_editor->get_indent_prefs(editor)->tab_width;
+ gint tab_stop = tab_width - (column % tab_width);
column += tab_stop - 1; /* -1 because we add 1 at the end of the loop */
g_string_append_printf(body, "\\hspace*{%dem}", tab_stop);
@@ -551,6 +552,7 @@
static void write_html_file(GeanyDocument *doc, const gchar *filename, gboolean use_zoom)
{
+ GeanyEditor *editor = doc->editor;
gint i, style = -1, old_style = 0, column = 0;
gchar c, c_next;
/* 0 - fore, 1 - back, 2 - bold, 3 - italic, 4 - font size, 5 - used(0/1) */
@@ -625,8 +627,8 @@
case '\t':
{
gint j;
- gint tab_stop = geany->editor_prefs->tab_width -
- (column % geany->editor_prefs->tab_width);
+ gint tab_width = p_editor->get_indent_prefs(editor)->tab_width;
+ gint tab_stop = tab_width - (column % tab_width);
column += tab_stop - 1; /* -1 because we add 1 at the end of the loop */
for (j = 0; j < tab_stop; j++)
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