diff options
author | Yi-Jheng Lin <yzlin@cs.nctu.edu.tw> | 2022-01-07 20:16:59 +0200 |
---|---|---|
committer | Alexander Naumov <alexander_naumov@opensuse.org> | 2022-01-07 20:16:59 +0200 |
commit | 491203b275682673784b867624351d73e16d11d0 (patch) | |
tree | 4b6c7d6ae19155a1f9c8443f8e0fde13cb5218dc | |
parent | 19e44115eb4dbee013a76459aa61c238facef865 (diff) | |
download | screen-491203b275682673784b867624351d73e16d11d0.tar.gz |
new hardstatus option %e - currently used encoding
-rw-r--r-- | src/screen.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/screen.c b/src/screen.c index f25f7fb..1a22892 100644 --- a/src/screen.c +++ b/src/screen.c @@ -2762,6 +2762,18 @@ char *MakeWinMsgEv(char *str, struct win *win, int esc, int padlen, struct event p += strlen(p) - 1; break; +#ifdef ENCODINGS + case 'e': + *p = 0; + D_encoding = nwin_options.encoding > 0 ? nwin_options.encoding : 0; + if (win && win->w_encoding) { + *p++ = ' '; + strcpy(p, EncodingName(win->w_encoding)); + } + p += strlen(p) - 1; + break; +#endif + case '{': { char rbuf[128]; |