From b3b435087933a698e6c972f3b5750110d1600b97 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Tue, 19 Aug 2008 16:40:19 -0400 Subject: [PATCH] BUG: fix for 6462, delete key should delete the current char --- Source/CursesDialog/cmCursesStringWidget.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx index 3007216cd..5a8b80d93 100644 --- a/Source/CursesDialog/cmCursesStringWidget.cxx +++ b/Source/CursesDialog/cmCursesStringWidget.cxx @@ -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);