mirror of
https://github.com/tmux/tmux.git
synced 2026-10-14 15:04:50 +00:00
Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master: Add a flag to mark screen_write_ctx as coming from pane input and change a function argument. For tree mode, hold a reference to prompt and other bits across command to avoid crashing when killing the session with the mode's pane. GitHub issue 5728.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: window-tree.c,v 1.96 2026/08/25 07:23:30 nicm Exp $ */
|
||||
/* $OpenBSD: window-tree.c,v 1.97 2026/10/12 18:23:25 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2017 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
@@ -1344,12 +1344,10 @@ window_tree_kill_current_callback(struct client *c, void *modedata,
|
||||
if (tolower((u_char) s[0]) != 'y' || s[1] != '\0')
|
||||
return (PROMPT_CLOSE);
|
||||
|
||||
data->references++;
|
||||
window_tree_kill_each(data, mode_tree_get_current(mtd), c, KEYC_NONE);
|
||||
server_renumber_all();
|
||||
|
||||
data->references++;
|
||||
cmdq_append(c, cmdq_get_callback(window_tree_command_done, data));
|
||||
|
||||
return (PROMPT_CLOSE);
|
||||
}
|
||||
|
||||
@@ -1365,12 +1363,10 @@ window_tree_kill_tagged_callback(struct client *c, void *modedata,
|
||||
if (tolower((u_char) s[0]) != 'y' || s[1] != '\0')
|
||||
return (PROMPT_CLOSE);
|
||||
|
||||
data->references++;
|
||||
mode_tree_each_tagged(mtd, window_tree_kill_each, c, KEYC_NONE, 1);
|
||||
server_renumber_all();
|
||||
|
||||
data->references++;
|
||||
cmdq_append(c, cmdq_get_callback(window_tree_command_done, data));
|
||||
|
||||
return (PROMPT_CLOSE);
|
||||
}
|
||||
|
||||
@@ -1453,6 +1449,8 @@ window_tree_key(struct window_mode_entry *wme, struct client *c,
|
||||
|
||||
item = mode_tree_get_current(data->data);
|
||||
finished = mode_tree_key(data->data, c, &key, m, &x, &y);
|
||||
if (data->dead)
|
||||
return;
|
||||
|
||||
again:
|
||||
if (item != (new_item = mode_tree_get_current(data->data))) {
|
||||
|
||||
Reference in New Issue
Block a user