From 88e23fd13e689284b4d1a0f33e3799ff5470cb28 Mon Sep 17 00:00:00 2001
From: Daniel Carl <danielcarl@gmx.de>
Date: Mon, 9 Jun 2014 18:42:09 +0200
Subject: [PATCH] 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.
---
 src/normal.c | 5 +++++
 1 file changed, 5 insertions(+)

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 */
-- 
2.20.1