Eric Pouech : kernel32: Added support for ctrl-home ( aka clear from beginning of line) in line edition in win32 mode.

Alexandre Julliard julliard at winehq.org
Mon Jan 31 11:26:13 CST 2011


Module: wine
Branch: master
Commit: 08f13cbd39dce3a6072d27dca46f11e3dbfca7d3
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=08f13cbd39dce3a6072d27dca46f11e3dbfca7d3

Author: Eric Pouech <eric.pouech at orange.fr>
Date:   Sat Jan 29 19:59:16 2011 +0100

kernel32: Added support for ctrl-home (aka clear from beginning of line) in line edition in win32 mode.

---

 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-cvs mailing list