projects
/
vimb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac3f424
)
Allow to go back to normal mode via ctrl-c too.
author
Daniel Carl
<danielcarl@gmx.de>
Mon, 19 Nov 2012 19:45:07 +0000
(20:45 +0100)
committer
Daniel Carl
<danielcarl@gmx.de>
Mon, 19 Nov 2012 19:45:07 +0000
(20:45 +0100)
src/keybind.c
patch
|
blob
|
history
src/keybind.h
patch
|
blob
|
history
diff --git
a/src/keybind.c
b/src/keybind.c
index
fc87bd9
..
4f2cef3
100644
(file)
--- a/
src/keybind.c
+++ b/
src/keybind.c
@@
-205,7
+205,7
@@
static gboolean keybind_keypress_callback(WebKitWebView* webview, GdkEventKey* e
guint state = (event->state & modifiers);
/* check for escape or modkeys or counts */
- if (
keyval == GDK_Escape && state == 0
) {
+ if (
IS_ESCAPE_KEY(keyval, state)
) {
completion_clean();
/* switch to normal mode and clear the input box */
Arg a = {VP_MODE_NORMAL, ""};
diff --git
a/src/keybind.h
b/src/keybind.h
index
ef9db09
..
7dab1ee
100644
(file)
--- a/
src/keybind.h
+++ b/
src/keybind.h
@@
-20,6
+20,8
@@
#ifndef KEYBIND_H
#define KEYBIND_H
+#define IS_ESCAPE_KEY(k, s) ((k == GDK_Escape && s == 0) || (k == GDK_c && s == GDK_CONTROL_MASK))
+
#include <gdk/gdkkeysyms.h>
#include <gdk/gdkkeysyms-compat.h>