Allow partial word selection for Find Usage

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@671 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2006-08-05 12:11:55 +00:00
parent ed0b029db8
commit c633b3f2c0
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2006-08-05 Nick Treleaven <nick.treleaven@btinternet.com>
* src/callbacks.c: Allow partial word selection for Find Usage.
2006-08-04 Nick Treleaven <nick.treleaven@btinternet.com>
* src/callbacks.c, src/callbacks.h, src/dialogs.c:

View File

@ -1321,7 +1321,7 @@ on_find_usage1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
gint i, pos, line = -1;
gint flags = SCFIND_MATCHCASE | SCFIND_WHOLEWORD;
gint flags;
gint idx;
struct TextToFind ttf;
gchar *buffer, *short_file_name, *string, *search_text;
@ -1334,9 +1334,13 @@ on_find_usage1_activate (GtkMenuItem *menuitem,
{ // take selected text if there is a selection
search_text = g_malloc(sci_get_selected_text_length(doc_list[idx].sci) + 1);
sci_get_selected_text(doc_list[idx].sci, search_text);
flags = SCFIND_MATCHCASE;
}
else
{
search_text = g_strdup(current_word);
flags = SCFIND_MATCHCASE | SCFIND_WHOLEWORD;
}
for(i = 0; i < GEANY_MAX_OPEN_FILES; i++)
{