mirror of
https://github.com/tmux/tmux.git
synced 2025-09-04 15:26:58 +00:00
Disable UTF-8 by default and add options to enable it.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* $Id: cmd-set-window-option.c,v 1.12 2008-09-25 23:28:15 nicm Exp $ */
|
||||
/* $Id: cmd-set-window-option.c,v 1.13 2008-11-16 13:28:59 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -181,6 +181,30 @@ cmd_set_window_option_exec(struct cmd *self, struct cmd_ctx *ctx)
|
||||
s->name, wl->idx, data->option);
|
||||
}
|
||||
|
||||
recalculate_sizes();
|
||||
} else if (strcmp(data->option, "utf8") == 0) {
|
||||
if (flag == -1) {
|
||||
ctx->error(ctx, "bad value: %s", data->value);
|
||||
return;
|
||||
}
|
||||
|
||||
if (flag == -2)
|
||||
wl->window->flags ^= WINDOW_UTF8;
|
||||
else {
|
||||
if (flag)
|
||||
wl->window->flags |= WINDOW_UTF8;
|
||||
else
|
||||
wl->window->flags &= ~WINDOW_UTF8;
|
||||
}
|
||||
|
||||
if (wl->window->flags & WINDOW_UTF8) {
|
||||
ctx->info(ctx, "window %s:%d: set %s",
|
||||
s->name, wl->idx, data->option);
|
||||
} else {
|
||||
ctx->info(ctx, "window %s:%d: cleared %s",
|
||||
s->name, wl->idx, data->option);
|
||||
}
|
||||
|
||||
recalculate_sizes();
|
||||
} else if (strcmp(data->option, "force-width") == 0) {
|
||||
if (data->value == NULL || number == -1) {
|
||||
|
Reference in New Issue
Block a user