mirror of
https://github.com/tmux/tmux.git
synced 2025-09-03 14:27:09 +00:00
Need to set clients in context before changing their reference count.
This commit is contained in:
@ -220,8 +220,7 @@ window_choose_data_run(struct window_choose_data *cdata)
|
||||
return;
|
||||
}
|
||||
|
||||
ctx = cmd_get_ctx();
|
||||
ctx->curclient = cdata->start_client;
|
||||
ctx = cmd_get_ctx(NULL, cdata->start_client);
|
||||
ctx->error = key_bindings_error;
|
||||
ctx->print = key_bindings_print;
|
||||
ctx->info = key_bindings_info;
|
||||
@ -492,7 +491,7 @@ window_choose_key(struct window_pane *wp, unused struct session *sess, int key)
|
||||
items = ARRAY_LENGTH(&data->list);
|
||||
|
||||
if (data->input_type == WINDOW_CHOOSE_GOTO_ITEM) {
|
||||
switch (mode_key_lookup(&data->mdata, key)) {
|
||||
switch (mode_key_lookup(&data->mdata, key, NULL)) {
|
||||
case MODEKEYCHOICE_CANCEL:
|
||||
data->input_type = WINDOW_CHOOSE_NORMAL;
|
||||
window_choose_redraw_screen(wp);
|
||||
@ -523,7 +522,7 @@ window_choose_key(struct window_pane *wp, unused struct session *sess, int key)
|
||||
return;
|
||||
}
|
||||
|
||||
switch (mode_key_lookup(&data->mdata, key)) {
|
||||
switch (mode_key_lookup(&data->mdata, key, NULL)) {
|
||||
case MODEKEYCHOICE_CANCEL:
|
||||
window_choose_fire_callback(wp, NULL);
|
||||
break;
|
||||
@ -777,7 +776,7 @@ window_choose_key_index(struct window_choose_mode_data *data, u_int idx)
|
||||
int mkey;
|
||||
|
||||
for (ptr = keys; *ptr != '\0'; ptr++) {
|
||||
mkey = mode_key_lookup(&data->mdata, *ptr);
|
||||
mkey = mode_key_lookup(&data->mdata, *ptr, NULL);
|
||||
if (mkey != MODEKEY_NONE && mkey != MODEKEY_OTHER)
|
||||
continue;
|
||||
if (idx-- == 0)
|
||||
@ -797,7 +796,7 @@ window_choose_index_key(struct window_choose_mode_data *data, int key)
|
||||
u_int idx = 0;
|
||||
|
||||
for (ptr = keys; *ptr != '\0'; ptr++) {
|
||||
mkey = mode_key_lookup(&data->mdata, *ptr);
|
||||
mkey = mode_key_lookup(&data->mdata, *ptr, NULL);
|
||||
if (mkey != MODEKEY_NONE && mkey != MODEKEY_OTHER)
|
||||
continue;
|
||||
if (key == *ptr)
|
||||
|
Reference in New Issue
Block a user