diff options
| author | 2019-03-08 10:34:20 +0000 | |
|---|---|---|
| committer | 2019-03-08 10:34:20 +0000 | |
| commit | adfef3cc825948f47024d5fcc73db9b8e5347afd (patch) | |
| tree | f8b08236873c96512f8f9d9a076b9743eca111ea /usr.bin/tmux/cmd-run-shell.c | |
| parent | Do not use window mode entry after free. (diff) | |
| download | wireguard-openbsd-adfef3cc825948f47024d5fcc73db9b8e5347afd.tar.xz wireguard-openbsd-adfef3cc825948f47024d5fcc73db9b8e5347afd.zip | |
Make the mode used to view command output (a variant of copy mode) use
its own mode definition struct with a different init function rather
than calling special setup functions.
Diffstat (limited to 'usr.bin/tmux/cmd-run-shell.c')
| -rw-r--r-- | usr.bin/tmux/cmd-run-shell.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-run-shell.c b/usr.bin/tmux/cmd-run-shell.c index 29ffcb440b8..a639197f886 100644 --- a/usr.bin/tmux/cmd-run-shell.c +++ b/usr.bin/tmux/cmd-run-shell.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-run-shell.c,v 1.56 2019/03/07 19:34:22 nicm Exp $ */ +/* $OpenBSD: cmd-run-shell.c,v 1.57 2019/03/08 10:34:20 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org> @@ -75,7 +75,10 @@ cmd_run_shell_print(struct job *job, const char *msg) return; } - window_copy_init_for_output(wp); + if (wp->mode == NULL || wp->mode->mode != &window_view_mode) { + window_pane_reset_mode(wp); + window_pane_set_mode(wp, &window_view_mode, NULL, NULL); + } window_copy_add(wp, "%s", msg); } |
