Revision: 1149 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1149&view=re... Author: frlan Date: 2010-01-31 20:58:42 +0000 (Sun, 31 Jan 2010)
Log Message: ----------- GeanyLaTeX: Make usage of glatex_insert_string() to insert environments and increase indent on list environments for inserted \item on glatex_insert_environment()
Modified Paths: -------------- trunk/geanylatex/src/latexenvironments.c
Modified: trunk/geanylatex/src/latexenvironments.c =================================================================== --- trunk/geanylatex/src/latexenvironments.c 2010-01-31 20:06:16 UTC (rev 1148) +++ trunk/geanylatex/src/latexenvironments.c 2010-01-31 20:58:42 UTC (rev 1149) @@ -74,7 +74,7 @@ const gchar *eol = editor_get_eol_char(doc->editor); selection = sci_get_selection_contents(doc->editor->sci);
- replacement = g_strconcat("\begin{", environment, "}", + replacement = g_strconcat("\begin{", environment, "}", eol,selection, eol, "\end{", environment, "}", eol, NULL);
sci_replace_sel(doc->editor->sci, replacement); @@ -97,7 +97,7 @@
if (type == GLATEX_ENVIRONMENT_TYPE_LIST) { - g_string_append(tmpstring, "\item"); + g_string_append(tmpstring, "\t\item"); g_string_append(tmpstring, eol); }
@@ -107,7 +107,7 @@ g_string_append(tmpstring, eol);
tmp = g_string_free(tmpstring, FALSE); - sci_insert_text(doc->editor->sci, pos, tmp); + glatex_insert_string(tmp, FALSE); sci_set_current_position(doc->editor->sci, pos + len + 9, TRUE); g_free(tmp); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.