From db5a5c131cc9d379c74c1b9afd116d61af87feb7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 5 Aug 2010 01:46:34 +0000 Subject: patch [#23185] Mark All in Text Editor always reports "Text not found" when wrap is off --- source/blender/editors/space_text/text_ops.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source') diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index ead25615b4e..efdb1638558 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -2366,6 +2366,7 @@ static int find_and_replace(bContext *C, wmOperator *op, short mode) SpaceText *st= CTX_wm_space_text(C); Text *start= NULL, *text= st->text; int flags, first= 1; + int found = 0; char *tmp; if(!st->findstr[0] || (mode == TEXT_REPLACE && !st->replacestr[0])) @@ -2431,9 +2432,10 @@ static int find_and_replace(bContext *C, wmOperator *op, short mode) first= 1; } else { - BKE_reportf(op->reports, RPT_ERROR, "Text not found: %s", st->findstr); + if(!found) BKE_reportf(op->reports, RPT_ERROR, "Text not found: %s", st->findstr); break; } + found = 1; } while(mode==TEXT_MARK_ALL); return OPERATOR_FINISHED; -- cgit v1.2.3