Revision: 5231 http://geany.svn.sourceforge.net/geany/?rev=5231&view=rev Author: ntrel Date: 2010-09-15 14:59:41 +0000 (Wed, 15 Sep 2010)
Log Message: ----------- Save document indent width with the session.
Modified Paths: -------------- trunk/ChangeLog trunk/src/keyfile.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-09-14 15:19:13 UTC (rev 5230) +++ trunk/ChangeLog 2010-09-15 14:59:41 UTC (rev 5231) @@ -1,3 +1,9 @@ +2010-09-15 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> + + * src/keyfile.c: + Save document indent width with the session. + + 2010-09-14 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/main.c:
Modified: trunk/src/keyfile.c =================================================================== --- trunk/src/keyfile.c 2010-09-14 15:19:13 UTC (rev 5230) +++ trunk/src/keyfile.c 2010-09-15 14:59:41 UTC (rev 5231) @@ -264,7 +264,7 @@ * (g_path_skip_root() to skip C:... on Windows) */ g_strdelimit((gchar*) utils_path_skip_root(locale_filename), ";", ':');
- fname = g_strdup_printf("%d;%s;%d;%d;%d;%d;%d;%s;%d", + fname = g_strdup_printf("%d;%s;%d;%d;%d;%d;%d;%s;%d;%d", sci_get_current_position(doc->editor->sci), ft->name, doc->readonly, @@ -273,7 +273,8 @@ doc->editor->auto_indent, doc->editor->line_wrapping, locale_filename, - doc->editor->line_breaking); + doc->editor->line_breaking, + doc->editor->indent_width); g_free(locale_filename); return fname; } @@ -988,7 +989,11 @@
if (doc) { - editor_set_indent(doc->editor, indent_type, doc->editor->indent_width); + gint indent_width = doc->editor->indent_width; + + if (len > 9) + indent_width = atoi(tmp[9]); + editor_set_indent(doc->editor, indent_type, indent_width); editor_set_line_wrapping(doc->editor, line_wrapping); doc->editor->line_breaking = line_breaking; doc->editor->auto_indent = auto_indent;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.