瀏覽代碼

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

Bill Hoffman 17 年之前
父節點
當前提交
b3b4350879
共有 1 個文件被更改,包括 9 次插入2 次删除
  1. 9 2
      Source/CursesDialog/cmCursesStringWidget.cxx

+ 9 - 2
Source/CursesDialog/cmCursesStringWidget.cxx

@@ -170,14 +170,21 @@ bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm,
       {
       {
       form_driver(form, REQ_END_FIELD);
       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 )
       if ( form->curcol > 0 )
         {
         {
         form_driver(form, REQ_DEL_PREV);
         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
     else
       {
       {
       this->OnType(key, fm, w);
       this->OnType(key, fm, w);