BUG: fix for 6462, delete key should delete the current char

This commit is contained in:
Bill Hoffman 2008-08-19 16:40:19 -04:00
parent 2f20b9d33b
commit b3b4350879
1 changed files with 9 additions and 2 deletions

View File

@ -170,14 +170,21 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm,
{
form_driver(form, REQ_END_FIELD);
}
else if ( key == ctrl('d') || key == 127 ||
key == KEY_BACKSPACE || key == KEY_DC )
else if ( key == 127 ||
key == KEY_BACKSPACE )
{
if ( form->curcol > 0 )
{
form_driver(form, REQ_DEL_PREV);
}
}
else if ( key == ctrl('d') ||key == KEY_DC )
{
if ( form->curcol > 0 )
{
form_driver(form, REQ_DEL_CHAR);
}
}
else
{
this->OnType(key, fm, w);