Kaydet (Commit) 2c8e69a1 authored tarafından Nick Treleaven's avatar Nick Treleaven

Fix incremental find and replace of back to back matches

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@368 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 545657d9
......@@ -4,6 +4,8 @@
Fixed nasty hang when closing a tab and both the next tab and the
first tab files have been externally modified.
* src/dialogs.c: Add mnemonics to Replace dialog buttons, reorder.
* src/document.c: Fix incremental find and replace of back to back
matches.
2006-05-25 Nick Treleaven <nick.treleaven@btinternet.com>
......
......@@ -671,7 +671,7 @@ void document_find_next(gint idx, const gchar *text, gint flags, gboolean find_b
selection_end = sci_get_selection_end(doc_list[idx].sci);
if (!inc && sci_can_copy(doc_list[idx].sci))
{ // there's a selection so go to the end
sci_goto_pos(doc_list[idx].sci, selection_end + 1, TRUE);
sci_goto_pos(doc_list[idx].sci, selection_end, TRUE);
}
sci_set_search_anchor(doc_list[idx].sci);
......@@ -711,9 +711,9 @@ void document_find_text(gint idx, const gchar *text, gint flags, gboolean search
if ((selection_end - selection_start) > 0)
{ // there's a selection so go to the end
if (search_backwards)
sci_goto_pos(doc_list[idx].sci, selection_start - 1, TRUE);
sci_goto_pos(doc_list[idx].sci, selection_start, TRUE);
else
sci_goto_pos(doc_list[idx].sci, selection_end + 1, TRUE);
sci_goto_pos(doc_list[idx].sci, selection_end, TRUE);
}
sci_set_search_anchor(doc_list[idx].sci);
......@@ -749,9 +749,9 @@ void document_replace_text(gint idx, const gchar *find_text, const gchar *replac
if ((selection_end - selection_start) > 0)
{ // there's a selection so go to the end
if (search_backwards)
sci_goto_pos(doc_list[idx].sci, selection_start - 1, TRUE);
sci_goto_pos(doc_list[idx].sci, selection_start, TRUE);
else
sci_goto_pos(doc_list[idx].sci, selection_end + 1, TRUE);
sci_goto_pos(doc_list[idx].sci, selection_end, TRUE);
}
sci_set_search_anchor(doc_list[idx].sci);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment