diff options
author | Amadeusz Sławiński <amade@asmblr.net> | 2011-08-27 16:13:23 +0200 |
---|---|---|
committer | Amadeusz Sławiński <amade@asmblr.net> | 2014-07-24 11:50:46 +0200 |
commit | 34ab3efc962f78935d94ad9a9957607907ddbf87 (patch) | |
tree | 94ebfe6b5acc7e3cd617f455bbc74921bdae4e32 | |
parent | 2052ea8fdad6e431eebaf4e6700703fb7c26cfcf (diff) | |
download | screen-34ab3efc962f78935d94ad9a9957607907ddbf87.tar.gz |
add %x escape code for (width)x(height)
-rw-r--r-- | src/screen.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/screen.c b/src/screen.c index 1096d9f..4906e15 100644 --- a/src/screen.c +++ b/src/screen.c @@ -2798,6 +2798,14 @@ MakeWinMsgEv(char *str, struct win *win, int esc, int padlen, struct event *ev, numpad++; } break; + case 'x': + *p = 0; + if (!win) + sprintf(p, "--x--"); + else + sprintf(p, "%dx%d", win->w_width, win->w_height); + p += strlen(p) - 1; + break; case 'n': s++; /* FALLTHROUGH */ |