diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-05-16 15:24:29 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-05-16 15:24:29 +0000 |
commit | 4d0108c2832ca062ae18270d3016b6b11eba26b7 (patch) | |
tree | 21ab95dd5c87b1f0b320100c09e15033e574447b /usr.bin/tmux/paste.c | |
parent | 3f33fb00a112af4bee22b475aa8aa7010c80bc79 (diff) |
Add 'e' key in buffer mode to open the buffer in an editor.
Diffstat (limited to 'usr.bin/tmux/paste.c')
-rw-r--r-- | usr.bin/tmux/paste.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.bin/tmux/paste.c b/usr.bin/tmux/paste.c index a6b925b05f0..48cab16721f 100644 --- a/usr.bin/tmux/paste.c +++ b/usr.bin/tmux/paste.c @@ -1,4 +1,4 @@ -/* $OpenBSD: paste.c,v 1.40 2019/04/02 09:03:39 nicm Exp $ */ +/* $OpenBSD: paste.c,v 1.41 2020/05/16 15:24:28 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -297,6 +297,15 @@ paste_set(char *data, size_t size, const char *name, char **cause) return (0); } +/* Set paste data without otherwise changing it. */ +void +paste_replace(struct paste_buffer *pb, char *data, size_t size) +{ + free(pb->data); + pb->data = data; + pb->size = size; +} + /* Convert start of buffer into a nice string. */ char * paste_make_sample(struct paste_buffer *pb) |