OSDN Git Service

Patch #1880711 - Fix escape key
authorJochen Tucht <jtuc@users.sourceforge.net>
Sun, 10 Feb 2008 12:10:44 +0000 (12:10 +0000)
committerJochen Tucht <jtuc@users.sourceforge.net>
Sun, 10 Feb 2008 12:10:44 +0000 (12:10 +0000)
Src/editlib/ccrystaleditview.cpp

index 2ba1185..dbf2ce9 100644 (file)
@@ -504,7 +504,9 @@ OnChar (UINT nChar, UINT nRepCnt, UINT nFlags)
     }
   // Accept control characters other than [\t\n\r] through Alt-Numpad
   if (nChar > 31
-  || GetKeyState(VK_CONTROL) >= 0 && nChar != 9 && nChar != 10 && nChar != 13)
+  || GetKeyState(VK_CONTROL) >= 0 &&
+      (nChar != 27 || GetKeyState(VK_ESCAPE) >= 0) &&
+      nChar != 9 && nChar != 10 && nChar != 13)
     {
       if (QueryEditable () && m_pTextBuffer != NULL)
         {