Fixed bug that did not single replace words with casesensitive off sometimes.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2495 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Vigna 2001-08-13 10:09:50 +00:00
parent 7b9594ef0f
commit 4a2096fff1
2 changed files with 18 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2001-08-13 Juergen Vigna <jug@sad.it>
* lyxfind.C (LyXReplace): fixed not single-replacing characters with
casesensitive off.
2001-08-11 Dekel Tsur <dekelts@tau.ac.il>
* Many files: Remove inherit_language, and add latex_language

View File

@ -76,7 +76,16 @@ int LyXReplace(BufferView * bv,
// if nothing selected or selection does not equal search string
// search and select next occurance and return if no replaceall
if (searchstr!=text->selectionAsString(bv->buffer())) {
string str1;
string str2;
if (casesens) {
str1 = searchstr;
str2 = text->selectionAsString(bv->buffer());
} else {
str1 = lowercase(searchstr);
str2 = lowercase(text->selectionAsString(bv->buffer()));
}
if (str1 != str2) {
if (!LyXFind(bv, searchstr, fw, false, casesens, matchwrd) ||
!replaceall)
{