[PATCH] [Kernel32]: added support for ctrl-home (aka clear from beg of line) in line edition in win32 mode

Eric Pouech eric.pouech at orange.fr
Sat Jan 29 12:59:16 CST 2011




A+
---

 dlls/kernel32/editline.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)


diff --git a/dlls/kernel32/editline.c b/dlls/kernel32/editline.c
index c2799af..a39fa8d 100644
--- a/dlls/kernel32/editline.c
+++ b/dlls/kernel32/editline.c
@@ -639,6 +639,16 @@ static void WCEL_KillToEndOfLine(WCEL_Context* ctx)
     WCEL_DeleteString(ctx, ctx->ofs, ctx->len);
 }
 
+static void WCEL_KillFromBegOfLine(WCEL_Context* ctx)
+{
+    if (ctx->ofs)
+    {
+        WCEL_SaveYank(ctx, 0, ctx->ofs);
+        WCEL_DeleteString(ctx, 0, ctx->ofs);
+        ctx->ofs = 0;
+    }
+}
+
 static void WCEL_KillMarkedZone(WCEL_Context* ctx)
 {
     unsigned beg, end;
@@ -883,6 +893,7 @@ static const KeyEntry Win32KeyMapCtrl[] =
     {/*VK_LEFT*/ 0x25, 	WCEL_MoveToLeftWord 	},
     {/*VK_RIGHT*/0x27,	WCEL_MoveToRightWord	},
     {/*VK_END*/  0x23,	WCEL_KillToEndOfLine	},
+    {/*VK_HOME*/ 0x24,	WCEL_KillFromBegOfLine	},
     {	0,		NULL 			}
 };
 




More information about the wine-patches mailing list