diff options
-rw-r--r-- | xxxterm.1 | 4 | ||||
-rw-r--r-- | xxxterm.c | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/xxxterm.1 b/xxxterm.1 index 1bdc7d5..34952bb 100644 --- a/xxxterm.1 +++ b/xxxterm.1 @@ -575,6 +575,10 @@ zoom in by 4% zoom out by 4% .It Cm z0 set zoom level to 100% +.It Cm [0-9]+Z +set zoom level to +.Cm arg +% .Sh ABOUT SCREENS The about screens are internally generated web pages by .Nm diff --git a/xxxterm.c b/xxxterm.c index 71e6c14..597adde 100644 --- a/xxxterm.c +++ b/xxxterm.c @@ -6575,6 +6575,17 @@ webview_hover_cb(WebKitWebView *wv, gchar *title, gchar *uri, struct tab *t) } } +int +zoom_amount(struct tab *t, struct karg *arg) +{ + struct karg narg = {0, NULL, -1}; + + narg.i = atoi(arg->s); + resizetab(t, &narg); + + return 0; +} + /* buffer commands receive the regex that triggered them in arg.s */ char bcmd[8]; struct buffercmd { @@ -6591,6 +6602,7 @@ struct buffercmd { { "^zi$", resizetab, XT_ZOOM_IN }, { "^zo$", resizetab, XT_ZOOM_OUT }, { "^z0$", resizetab, XT_ZOOM_NORMAL }, + { "^[0-9]+Z$", zoom_amount, 0 }, }; void |