When using Find All in the Find dialog, display matches only once per line in the messages window (patch by Bert Vermeulen, thanks).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3627 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2009-03-13 17:23:56 +00:00
parent a70a679898
commit b2faa6dcfb
2 changed files with 12 additions and 4 deletions

View File

@ -4,6 +4,9 @@
src/main.c, src/plugindata.h, src/plugins.c, src/prefs.c,
src/prefs.h:
Add an option to set an additional plugin lookup path.
* src/search.c:
When using Find All in the Find dialog, display matches only once
per line in the messages window (patch by Bert Vermeulen, thanks).
2009-03-10 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>

View File

@ -1603,6 +1603,7 @@ static gint find_document_usage(GeanyDocument *doc, const gchar *search_text, gi
while (1)
{
gint pos, line, start, find_len;
gint prev_line = -1;
pos = sci_find_text(doc->editor->sci, flags, &ttf);
if (pos == -1)
@ -1613,10 +1614,14 @@ static gint find_document_usage(GeanyDocument *doc, const gchar *search_text, gi
count++;
line = sci_get_line_from_position(doc->editor->sci, pos);
if (line != prev_line)
{
buffer = sci_get_line(doc->editor->sci, line);
msgwin_msg_add(COLOR_BLACK, line + 1, doc,
"%s:%d : %s", short_file_name, line + 1, g_strstrip(buffer));
g_free(buffer);
prev_line = line;
}
start = ttf.chrgText.cpMax + 1;
ttf.chrg.cpMin = start;