Ultime correzioni ricerca in viswin

git-svn-id: svn://10.65.10.50/trunk@828 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
villa 1995-01-05 12:01:53 +00:00
parent 90058a54bc
commit a23ef0bbc4
2 changed files with 4 additions and 5 deletions

View File

@ -224,8 +224,7 @@ long TTextfile::search(const char* txt, int& ret, long from, bool down,
for (long i = from; down ? (i < lines()) : (i >= 0); down ? i++ : i--)
{
lin = line(i);
if (!casesens)
lin.lower();
if (!casesens) lin.lower();
if ((ret = lin.find(text)) != -1)
return i;
}

View File

@ -2005,13 +2005,13 @@ void TViswin::find()
m.set(F_STRING, _txt_to_find);
m.set(F_DIRECT, _down_dir ? "D" : "U");
m.set(F_CASE, _case_sensitive ? "" : "X");
m.set(F_CASE, _case_sensitive ? "X" : "");
if (m.run() == K_ENTER)
{
_txt_to_find = m.get(F_STRING);
_down_dir = m.get(F_DIRECT) == "D";
_case_sensitive = !(m.get_bool(F_CASE));
_case_sensitive = m.get_bool(F_CASE);
int x;
long l = search(_txt_to_find, x, _point.y, _down_dir, _case_sensitive);
@ -2088,7 +2088,7 @@ TViswin::TViswin(const char *fname,
_scrolling (FALSE), _selflag (FALSE), _need_update (TRUE), _need_scroll (none),
_multiple (FALSE), _rulers(rulers), _txt_to_find(64),
_frozen (FALSE), _brwfld(brwfld), _link_button(-1),
_down_dir(TRUE), _showbuts(FALSE)
_down_dir(TRUE), _showbuts(FALSE), _case_sensitive(FALSE)
{
if (title == NULL)
title = (fname ? fname : "Anteprima di stampa");