From 08f13cbd39dce3a6072d27dca46f11e3dbfca7d3 Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Sat, 29 Jan 2011 19:59:16 +0100 Subject: [PATCH] kernel32: Added support for ctrl-home (aka clear from beginning of line) in line edition in win32 mode. --- dlls/kernel32/editline.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dlls/kernel32/editline.c b/dlls/kernel32/editline.c index c2799afae57..a39fa8d79d2 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 } }; -- 2.11.4.GIT