SF.net SVN: geany:[4901] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Tue May 11 12:10:31 UTC 2010
Revision: 4901
http://geany.svn.sourceforge.net/geany/?rev=4901&view=rev
Author: ntrel
Date: 2010-05-11 12:10:31 +0000 (Tue, 11 May 2010)
Log Message:
-----------
Only replace template filename matching start of word on saving.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/document.c
trunk/src/search.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-05-11 11:57:52 UTC (rev 4900)
+++ trunk/ChangeLog 2010-05-11 12:10:31 UTC (rev 4901)
@@ -4,6 +4,8 @@
Fix search_find_text not returning -1 when match is out of range.
This fixes invalid memory reads and wrong template filename
wildcard replacement.
+ * src/search.c, src/document.c:
+ Only replace template filename matching start of word on saving.
2010-05-10 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2010-05-11 11:57:52 UTC (rev 4900)
+++ trunk/src/document.c 2010-05-11 12:10:31 UTC (rev 4901)
@@ -93,7 +93,7 @@
*
* Never assume that the order of document pointers is the same as the order of notebook tabs.
* Notebook tabs can be reordered. Use @c document_get_from_page(). */
-GPtrArray *documents_array;
+GPtrArray *documents_array = NULL;
/* an undo action, also used for redo actions */
@@ -1504,7 +1504,7 @@
g_return_if_fail(doc->file_type != NULL);
if (doc->file_type->extension)
- filebase = g_strconcat(GEANY_STRING_UNTITLED, "\\.\\w+", NULL);
+ filebase = g_strconcat("\\<", GEANY_STRING_UNTITLED, "\\.\\w+", NULL);
else
filebase = g_strdup(GEANY_STRING_UNTITLED);
Modified: trunk/src/search.c
===================================================================
--- trunk/src/search.c 2010-05-11 11:57:52 UTC (rev 4900)
+++ trunk/src/search.c 2010-05-11 12:10:31 UTC (rev 4901)
@@ -1647,6 +1647,10 @@
if (~sflags & SCFIND_MATCHCASE)
rflags |= REG_ICASE;
+ if (sflags & (SCFIND_WHOLEWORD | SCFIND_WORDSTART))
+ {
+ g_warning("Unsupported regex flags found!");
+ }
err = regcomp(regex, str, rflags);
if (err != 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