summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Carl <danielcarl@gmx.de>2014-06-09 18:42:09 +0200
committerDaniel Carl <danielcarl@gmx.de>2014-06-09 18:42:09 +0200
commit88e23fd13e689284b4d1a0f33e3799ff5470cb28 (patch)
treeab87e248badf9dc830a5f49e212452edb55e85a1
parentdd0d010d232d0a8bdfa6e944c94ae4ada37a5a5c (diff)
Check second key for z{x} commands.
We assumed to zoom out if the user does not zoom in. So every z{x} with x not in "ziI" zoomed out.
-rw-r--r--src/normal.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/normal.c b/src/normal.c
index 8877987..7ea484e 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -791,6 +791,11 @@ static VbResult normal_zoom(const NormalCmdInfo *info)
WebKitWebSettings *setting;
WebKitWebView *view = vb.gui.webview;
+ /* check if the second key is allowed */
+ if (!strchr("iIoOz", info->key2)) {
+ return RESULT_ERROR;
+ }
+
count = info->count ? (float)info->count : 1.0;
if (info->key2 == 'z') { /* zz reset zoom */