From: Daniel Carl Date: Sat, 21 Sep 2013 19:03:54 +0000 (+0200) Subject: Added cursor to default key bindings. X-Git-Url: https://git.owens.tech/assets/me.jpg/assets/me.jpg/git?a=commitdiff_plain;h=e6aeaa50035bf8ca92083181262cd94c1c7ed989;p=vimb.git Added cursor to default key bindings. Removed those cursor keybindings that where introduced to fix an issue that does not exist anymore. --- diff --git a/src/default.h b/src/default.h index 26c70d2..c0c029d 100644 --- a/src/default.h +++ b/src/default.h @@ -65,6 +65,8 @@ static char *default_config[] = { "set insecure-content-show=off", "set insecure-content-run=off", #endif + "cmap ", + "cmap ", NULL }; diff --git a/src/main.c b/src/main.c index a4f8609..4e3afd5 100644 --- a/src/main.c +++ b/src/main.c @@ -731,7 +731,6 @@ static void init_core(void) mode_add('p', pass_enter, pass_leave, pass_keypress, NULL); mode_enter('n'); - map_init(); init_files(); session_init(); setting_init(); diff --git a/src/map.c b/src/map.c index c6a893f..938b545 100644 --- a/src/map.c +++ b/src/map.c @@ -49,16 +49,6 @@ static void showcmd(char *keys, int keylen, gboolean append); static void free_map(Map *map); -void map_init(void) -{ - /* bind cursor keys to ^P and ^N but only in command mode else down would - * trigger the queue pop */ - map_insert("", "\x10", 'c'); - map_insert("", "\x0e", 'c'); - map_insert("", "k", 'n'); - map_insert("", "j", 'n'); -} - void map_cleanup(void) { if (map.list) { @@ -390,7 +380,8 @@ static char *map_convert_keys(char *in, int inlen, int *len) } } - if (!raw) { + /* if we could not convert it jet - try to translate the label */ + if (!rawlen) { raw = map_convert_keylabel(p, symlen, &rawlen); } } diff --git a/src/map.h b/src/map.h index 03b360d..26d66df 100644 --- a/src/map.h +++ b/src/map.h @@ -32,7 +32,6 @@ typedef enum { MAP_NOMATCH } MapState; -void map_init(void); void map_cleanup(void); gboolean map_keypress(GtkWidget *widget, GdkEventKey* event, gpointer data); MapState map_handle_keys(const char *keys, int keylen);