Add 'e' key in buffer mode to open the buffer in an editor.

This commit is contained in:
nicm
2020-05-16 15:24:28 +00:00
parent a3cbc014c3
commit 78595457f9
11 changed files with 177 additions and 4 deletions

View File

@ -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)