From: nicm Date: Thu, 21 Mar 2024 11:32:49 +0000 (+0000) Subject: Use -p for default paste-buffer command in buffer mode, it will only do X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2e03ad1ff7419b435c66665a7c481b58fbd744ce;p=openbsd Use -p for default paste-buffer command in buffer mode, it will only do anything if the application asked for it. From Gregory Anders. --- diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1 index b0f6a0d58f9..658bb25e056 100644 --- a/usr.bin/tmux/tmux.1 +++ b/usr.bin/tmux/tmux.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tmux.1,v 1.937 2024/03/13 11:25:50 nicm Exp $ +.\" $OpenBSD: tmux.1,v 1.938 2024/03/21 11:32:49 nicm Exp $ .\" .\" Copyright (c) 2007 Nicholas Marriott .\" @@ -14,7 +14,7 @@ .\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: March 13 2024 $ +.Dd $Mdocdate: March 21 2024 $ .Dt TMUX 1 .Os .Sh NAME @@ -6469,7 +6469,7 @@ is replaced by the buffer name in and the result executed as a command. If .Ar template -is not given, "paste-buffer -b \[aq]%%\[aq]" is used. +is not given, "paste-buffer -p -b \[aq]%%\[aq]" is used. .Pp .Fl O specifies the initial sort field: one of diff --git a/usr.bin/tmux/window-buffer.c b/usr.bin/tmux/window-buffer.c index 21821495e6c..c677c646f78 100644 --- a/usr.bin/tmux/window-buffer.c +++ b/usr.bin/tmux/window-buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-buffer.c,v 1.37 2022/11/03 08:41:53 nicm Exp $ */ +/* $OpenBSD: window-buffer.c,v 1.38 2024/03/21 11:32:49 nicm Exp $ */ /* * Copyright (c) 2017 Nicholas Marriott @@ -36,7 +36,7 @@ static void window_buffer_key(struct window_mode_entry *, struct client *, struct session *, struct winlink *, key_code, struct mouse_event *); -#define WINDOW_BUFFER_DEFAULT_COMMAND "paste-buffer -b '%%'" +#define WINDOW_BUFFER_DEFAULT_COMMAND "paste-buffer -p -b '%%'" #define WINDOW_BUFFER_DEFAULT_FORMAT \ "#{t/p:buffer_created}: #{buffer_sample}"