From 56404160def809504c373b1aa8c42ff758a9db95 Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Mon, 30 Apr 2007 12:43:22 +0000 Subject: [PATCH] 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 --- ChangeLog | 2 ++ src/search.c | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index dad86e2c..611d9520 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,8 @@ * src/search.c: Switch to status window when using Replace In Session to show which documents had replacements made. + * src/search.c: + Show number of matches when using Mark command. 2007-04-29 Nick Treleaven diff --git a/src/search.c b/src/search.c index 9e35dc37..af1e2a67 100644 --- a/src/search.c +++ b/src/search.c @@ -856,11 +856,17 @@ on_find_dialog_response(GtkDialog *dialog, gint response, gpointer user_data) break; case GEANY_RESPONSE_MARK: - { 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; - } } if (check_close) gtk_widget_hide(widgets.find_dialog);