summaryrefslogtreecommitdiff
path: root/pluma/pluma-commands-search.c
diff options
context:
space:
mode:
authorbl0ckeduser <[email protected]>2013-05-31 13:46:48 -0400
committerbl0ckeduser <[email protected]>2013-05-31 13:46:48 -0400
commit9b7c40cb7350c5eb04f6c0bc472f25c44bd55025 (patch)
tree6c392f434d0ec5ac9ca9f8d71f89eb6d89c1bdcf /pluma/pluma-commands-search.c
parentd5249f5fe6ec943e813fe32ad47035aac543bbf3 (diff)
downloadpluma-9b7c40cb7350c5eb04f6c0bc472f25c44bd55025.tar.bz2
pluma-9b7c40cb7350c5eb04f6c0bc472f25c44bd55025.tar.xz
Fix search/replace of strings containing backslashes
Diffstat (limited to 'pluma/pluma-commands-search.c')
-rw-r--r--pluma/pluma-commands-search.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/pluma/pluma-commands-search.c b/pluma/pluma-commands-search.c
index ee1b5129..298325eb 100644
--- a/pluma/pluma-commands-search.c
+++ b/pluma/pluma-commands-search.c
@@ -241,7 +241,7 @@ do_find (PlumaSearchDialog *dialog,
doc = PLUMA_DOCUMENT (gtk_text_view_get_buffer (GTK_TEXT_VIEW (active_view)));
- entry_text = pluma_search_dialog_get_search_text (dialog);
+ entry_text = pluma_utils_escape_search_text (pluma_search_dialog_get_search_text (dialog));
match_case = pluma_search_dialog_get_match_case (dialog);
entire_word = pluma_search_dialog_get_entire_word (dialog);
@@ -269,7 +269,7 @@ do_find (PlumaSearchDialog *dialog,
if (found)
text_found (window, 0);
else
- text_not_found (window, entry_text);
+ text_not_found (window, pluma_utils_unescape_search_text (entry_text));
gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog),
PLUMA_SEARCH_DIALOG_REPLACE_RESPONSE,
@@ -335,12 +335,12 @@ do_replace (PlumaSearchDialog *dialog,
if (doc == NULL)
return;
- search_entry_text = pluma_search_dialog_get_search_text (dialog);
+ search_entry_text = pluma_utils_escape_search_text (pluma_search_dialog_get_search_text (dialog));
g_return_if_fail ((search_entry_text) != NULL);
g_return_if_fail ((*search_entry_text) != '\0');
/* replace text may be "", we just delete */
- replace_entry_text = pluma_search_dialog_get_replace_text (dialog);
+ replace_entry_text = pluma_utils_escape_search_text (pluma_search_dialog_get_replace_text (dialog));
g_return_if_fail ((replace_entry_text) != NULL);
unescaped_search_text = pluma_utils_unescape_search_text (search_entry_text);
@@ -394,12 +394,12 @@ do_replace_all (PlumaSearchDialog *dialog,
doc = PLUMA_DOCUMENT (gtk_text_view_get_buffer (GTK_TEXT_VIEW (active_view)));
- search_entry_text = pluma_search_dialog_get_search_text (dialog);
+ search_entry_text = pluma_utils_escape_search_text( pluma_search_dialog_get_search_text (dialog));
g_return_if_fail ((search_entry_text) != NULL);
g_return_if_fail ((*search_entry_text) != '\0');
/* replace text may be "", we just delete all occurrencies */
- replace_entry_text = pluma_search_dialog_get_replace_text (dialog);
+ replace_entry_text = pluma_utils_escape_search_text (pluma_search_dialog_get_replace_text (dialog));
g_return_if_fail ((replace_entry_text) != NULL);
match_case = pluma_search_dialog_get_match_case (dialog);
@@ -419,7 +419,7 @@ do_replace_all (PlumaSearchDialog *dialog,
}
else
{
- text_not_found (window, search_entry_text);
+ text_not_found (window, pluma_utils_unescape_search_text (search_entry_text));
}
gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog),