SF.net SVN: geany:[3384] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Tue Dec 16 13:16:33 UTC 2008
Revision: 3384
http://geany.svn.sourceforge.net/geany/?rev=3384&view=rev
Author: ntrel
Date: 2008-12-16 13:16:33 +0000 (Tue, 16 Dec 2008)
Log Message:
-----------
Fix replacing %ws% and %newline% in snippets (oops).
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/editor.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-12-16 13:01:47 UTC (rev 3383)
+++ trunk/ChangeLog 2008-12-16 13:16:33 UTC (rev 3384)
@@ -5,6 +5,8 @@
Add configuration_add_pref_group(), with separate array for GUI
prefs.
Move search pref group to search.c.
+ * src/editor.c:
+ Fix replacing %ws% and %newline% in snippets (oops).
2008-12-15 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c 2008-12-16 13:01:47 UTC (rev 3383)
+++ trunk/src/editor.c 2008-12-16 13:16:33 UTC (rev 3384)
@@ -1789,6 +1789,7 @@
* NOT any hard tabs (you get those when copying document text with the Tabs
* & Spaces indent mode set).
* @note This doesn't scroll the cursor in view afterwards. */
+/* note: %ws% and %newline% are just for snippets, they probably shouldn't be here :-/ */
static void editor_insert_text_block(GeanyEditor *editor, const gchar *text, gint insert_pos,
gint cursor_index, gint newline_indent_size)
{
@@ -1821,10 +1822,12 @@
/* transform line endings */
utils_string_replace_all(buf, "\n", editor_get_eol_char(editor));
+ utils_string_replace_all(buf, "%newline%", editor_get_eol_char(editor));
/* transform tabs into indent widths (in spaces) */
whitespace = g_strnfill(editor_get_indent_prefs(editor)->width, ' ');
utils_string_replace_all(buf, "\t", whitespace);
+ utils_string_replace_all(buf, "%ws%", whitespace);
g_free(whitespace);
if (cursor_index >= 0)
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