From: Daniel Carl Date: Mon, 9 Jun 2014 16:42:09 +0000 (+0200) Subject: Check second key for z{x} commands. X-Git-Url: https://git.owens.tech/assets/static/git-logo.png/assets/static/git-logo.png/git?a=commitdiff_plain;h=88e23fd13e689284b4d1a0f33e3799ff5470cb28;p=vimb.git 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. --- 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 */