summaryrefslogtreecommitdiffstats
path: root/Source/CursesDialog
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-08-19 20:40:19 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-08-19 20:40:19 (GMT)
commitb3b435087933a698e6c972f3b5750110d1600b97 (patch)
treebc7a5d318a0a68c07c2c440a0f630db0c7810acd /Source/CursesDialog
parent2f20b9d33b7f2c303a84e400abe13a8ff6cd811a (diff)
downloadCMake-b3b435087933a698e6c972f3b5750110d1600b97.zip
CMake-b3b435087933a698e6c972f3b5750110d1600b97.tar.gz
CMake-b3b435087933a698e6c972f3b5750110d1600b97.tar.bz2
BUG: fix for 6462, delete key should delete the current char
Diffstat (limited to 'Source/CursesDialog')
-rw-r--r--Source/CursesDialog/cmCursesStringWidget.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx
index 3007216..5a8b80d 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);