From 5e392fe5bb85727d51a77442cb29ee2484f4e0f9 Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Tue, 6 Dec 2016 11:54:55 -0500 Subject: [PATCH] fixed ctrl+a and ctrl+e shortcuts --- xedit.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/xedit.c b/xedit.c index dd7d347..9832c51 100644 --- a/xedit.c +++ b/xedit.c @@ -28,6 +28,8 @@ static void delete(void); static void del_to_bol(void); static void del_to_bow(void); static void backspace(void); +static void cursor_bol(void); +static void cursor_eol(void); static void cursor_home(void); static void cursor_end(void); static void cursor_up(void); @@ -124,8 +126,8 @@ static KeyBinding Bindings[] = { //{ ModCtrl, 'k', del_to_eol }, { ModCtrl, 'w', del_to_bow }, { ModCtrl, 'h', backspace }, - { ModCtrl, 'a', cursor_home }, - { ModCtrl, 'e', cursor_end }, + { ModCtrl, 'a', cursor_bol }, + { ModCtrl, 'e', cursor_eol }, /* Standard Text Editing Shortcuts */ { ModCtrl, 's', save }, @@ -395,6 +397,14 @@ static void backspace(void) { view_delete(currview(), LEFT, byword); } +static void cursor_bol(void) { + view_bol(currview(), false); +} + +static void cursor_eol(void) { + view_eol(currview(), false); +} + static void cursor_home(void) { bool extsel = x11_keymodsset(ModShift); if (x11_keymodsset(ModCtrl)) -- 2.49.0