From e3206f6ff9960a80af37bb0da63a7deb5d58f74b Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 21 Aug 2024 04:37:42 +0000 Subject: [PATCH] Set the default for extended-keys back to off because it appears emacs turns the keys on but does not correctly handle them except in xterm (!). Also fix so that off takes effect as expected. --- usr.bin/tmux/input.c | 4 ++-- usr.bin/tmux/options-table.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/tmux/input.c b/usr.bin/tmux/input.c index eb23e89c7f7..6cf28f68852 100644 --- a/usr.bin/tmux/input.c +++ b/usr.bin/tmux/input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: input.c,v 1.227 2024/08/21 04:17:09 nicm Exp $ */ +/* $OpenBSD: input.c,v 1.228 2024/08/21 04:37:42 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -1412,7 +1412,7 @@ input_csi_dispatch(struct input_ctx *ictx) * Set the extended key reporting mode as per the client request, * unless "extended-keys always" forces us into mode 1. */ - if (options_get_number(global_options, "extended-keys") == 2) + if (options_get_number(global_options, "extended-keys") != 1) break; screen_write_mode_clear(sctx, MODE_KEYS_EXTENDED|MODE_KEYS_EXTENDED_2); diff --git a/usr.bin/tmux/options-table.c b/usr.bin/tmux/options-table.c index dd1782bc280..59cf34654aa 100644 --- a/usr.bin/tmux/options-table.c +++ b/usr.bin/tmux/options-table.c @@ -1,4 +1,4 @@ -/* $OpenBSD: options-table.c,v 1.176 2024/08/21 04:17:09 nicm Exp $ */ +/* $OpenBSD: options-table.c,v 1.177 2024/08/21 04:37:42 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott @@ -313,7 +313,7 @@ const struct options_table_entry options_table[] = { .type = OPTIONS_TABLE_CHOICE, .scope = OPTIONS_TABLE_SERVER, .choices = options_table_extended_keys_list, - .default_num = 1, + .default_num = 0, .text = "Whether to request extended key sequences from terminals " "that support it." }, -- 2.20.1