Show number of matches when using Mark command.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1492 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2007-04-30 12:43:22 +00:00
parent 7e000a4668
commit 56404160de
2 changed files with 11 additions and 3 deletions

View File

@ -12,6 +12,8 @@
* src/search.c: * src/search.c:
Switch to status window when using Replace In Session to show which Switch to status window when using Replace In Session to show which
documents had replacements made. documents had replacements made.
* src/search.c:
Show number of matches when using Mark command.
2007-04-29 Nick Treleaven <nick.treleaven@btinternet.com> 2007-04-29 Nick Treleaven <nick.treleaven@btinternet.com>

View File

@ -856,11 +856,17 @@ on_find_dialog_response(GtkDialog *dialog, gint response, gpointer user_data)
break; break;
case GEANY_RESPONSE_MARK: case GEANY_RESPONSE_MARK:
{
if (DOC_IDX_VALID(idx)) if (DOC_IDX_VALID(idx))
search_mark(idx, search_data.text, search_data.flags); {
gint count = search_mark(idx, search_data.text, search_data.flags);
if (count == 0)
ui_set_statusbar(_("No matches found for '%s'."), search_data.text);
else
ui_set_statusbar(_("Found %d matches for '%s'."), count,
search_data.text);
}
break; break;
}
} }
if (check_close) if (check_close)
gtk_widget_hide(widgets.find_dialog); gtk_widget_hide(widgets.find_dialog);