Fixed broken Find usage.
Put "No matches" message also in the message window. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@630 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
902379738b
commit
ac34496500
@ -9,6 +9,9 @@
|
||||
Added simple wrapper function win32_open_browser().
|
||||
* src/dialogs.c, src/main.c, src/document.c, src/callbacks.c:
|
||||
Removed some unneeded functions to avoid duplicate code.
|
||||
* src/callbacks.c:
|
||||
Fixed broken Find usage.
|
||||
Put "No matches" message also in the message window.
|
||||
|
||||
|
||||
2006-07-24 Enrico Tröger <enrico.troeger@uvena.de>
|
||||
|
@ -1358,8 +1358,7 @@ on_find_usage1_activate (GtkMenuItem *menuitem,
|
||||
{
|
||||
ttf.chrg.cpMin = 0;
|
||||
ttf.chrg.cpMax = sci_get_length(doc_list[i].sci);
|
||||
ttf.lpstrText = g_malloc(sizeof search_text);
|
||||
strncpy(ttf.lpstrText, search_text, sizeof search_text);
|
||||
ttf.lpstrText = search_text;
|
||||
while (1)
|
||||
{
|
||||
pos = sci_find_text(doc_list[i].sci, flags, &ttf);
|
||||
@ -1381,11 +1380,15 @@ on_find_usage1_activate (GtkMenuItem *menuitem,
|
||||
g_free(string);
|
||||
ttf.chrg.cpMin = ttf.chrgText.cpMax + 1;
|
||||
}
|
||||
g_free(ttf.lpstrText);
|
||||
}
|
||||
}
|
||||
if (line == -1) // no matches were found (searching from unnamed file)
|
||||
msgwin_status_add(_("No matches found for '%s'."), search_text);
|
||||
{
|
||||
gchar *text = g_strdup_printf(_("No matches found for '%s'."), search_text);
|
||||
msgwin_status_add(text);
|
||||
msgwin_msg_add(-1, -1, text);
|
||||
g_free(text);
|
||||
}
|
||||
|
||||
g_free(search_text);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user