Revision: 1351 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1351&view=re... Author: frlan Date: 2010-05-15 16:37:07 +0000 (Sat, 15 May 2010)
Log Message: ----------- GeanyLaTeX: Remove indention logic from inside insert environment, as it caused more issue as it solves any realistic issue. Needs to reimplemented some time if really needed and wished.
Modified Paths: -------------- trunk/geanylatex/src/latexenvironments.c
Modified: trunk/geanylatex/src/latexenvironments.c =================================================================== --- trunk/geanylatex/src/latexenvironments.c 2010-05-14 19:27:13 UTC (rev 1350) +++ trunk/geanylatex/src/latexenvironments.c 2010-05-15 16:37:07 UTC (rev 1351) @@ -130,12 +130,12 @@ { g_string_append(tmpstring, "}"); } - g_string_append(tmpstring, "\n\t"); + g_string_append(tmpstring, "\n");
if (type == GLATEX_ENVIRONMENT_TYPE_LIST) { - g_string_append(tmpstring, "\item "); + g_string_append(tmpstring, "\t\item "); }
tmp = g_string_free(tmpstring, FALSE); @@ -147,23 +147,17 @@
tmp = g_strdup_printf("\n\end{%s}", environment); glatex_insert_string(tmp, FALSE); + g_free(tmp);
indention_prefs = editor_get_indent_prefs(doc->editor); - sci_set_line_indentation(doc->editor->sci, - sci_get_current_line(doc->editor->sci), - indent + indention_prefs->width); - sci_set_line_indentation(doc->editor->sci, - sci_get_current_line(doc->editor->sci) + 1, indent); - - if (indent != 0 && type != GLATEX_ENVIRONMENT_TYPE_LIST) + if (type == GLATEX_ENVIRONMENT_TYPE_LIST) { - sci_set_current_position(doc->editor->sci, - sci_get_current_position(doc->editor->sci) + indent - - (editor_get_eol_char_len(doc->editor) + 1), TRUE); + sci_set_line_indentation(doc->editor->sci, + sci_get_current_line(doc->editor->sci), + indent + indention_prefs->width); } - - g_free(tmp); - + sci_set_line_indentation(doc->editor->sci, + sci_get_current_line(doc->editor->sci) + 1, indent); sci_end_undo_action(doc->editor->sci); } }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org