diff --git a/include/maskfld.cpp b/include/maskfld.cpp index c1079e601..0ad41354a 100755 --- a/include/maskfld.cpp +++ b/include/maskfld.cpp @@ -990,7 +990,7 @@ void TButton_field::create(WINDOW parent) if (_ctl_data._prompt.empty()) _ctl_data._prompt = "~Conferma"; _virtual_key = 'C'; - _exit_key = K_ENTER; + _exit_key = K_ENTER; if (_ctl_data._bmp_up == 0) _ctl_data._bmp_up = BMP_OK; break; @@ -2073,10 +2073,10 @@ bool TBrowse::do_link(bool insert) TString inp_id(i); TString16 field_name(_inp_fn.get()); TString s(field_name); - const int pos = s.find(","); + const int pos = s.find(","); - if (pos >= 0) - s.cut(pos); + if (pos >= 0) + s.cut(pos); s << "="; if (inp_id[0] == '"') @@ -3727,10 +3727,10 @@ bool TList_field::on_key(KEY key) { get_window_data(); set_dirty(); - on_hit(); + return on_hit(); } else - if (key == K_TAB || key == K_ENTER) + if (to_check(key, TRUE)) { bool ok = TRUE; if (validate_func() >= 0) @@ -3742,9 +3742,6 @@ bool TList_field::on_key(KEY key) return error_box(get_warning()); } } - ok = handler(key); - if (!ok) - return FALSE; } else if (key == K_F2) diff --git a/include/printwin.cpp b/include/printwin.cpp index e6254c664..d67f5e284 100755 --- a/include/printwin.cpp +++ b/include/printwin.cpp @@ -216,8 +216,8 @@ void TPrintwin::paint_row(long j) // Questa e' la patch per TTY.DRV. if (j > 0 && (j % _realformlen) == 0) { - TString s(512); - s << "\015" << _txt.line(j-1) << '\n'; + TString s(516); + s << '\r' << _txt.line(j-1) << "\n\r"; s << _txt.line(j); xvt_dwin_draw_text(win(), 0, y, (char*)(const char*)s, -1); }