mirror of
https://github.com/tmate-io/tmate.git
synced 2026-01-23 02:24:06 +00:00
There is no longer a need for a paste_stack struct or for global_buffers
to be global. Move to paste.c.
This commit is contained in:
parent
7ab2690be8
commit
bec6c807cd
14 changed files with 63 additions and 66 deletions
|
|
@ -66,7 +66,7 @@ cmd_save_buffer_exec(struct cmd *self, struct cmd_q *cmdq)
|
|||
FILE *f;
|
||||
|
||||
if (!args_has(args, 'b')) {
|
||||
if ((pb = paste_get_top(&global_buffers)) == NULL) {
|
||||
if ((pb = paste_get_top()) == NULL) {
|
||||
cmdq_error(cmdq, "no buffers");
|
||||
return (CMD_RETURN_ERROR);
|
||||
}
|
||||
|
|
@ -78,7 +78,7 @@ cmd_save_buffer_exec(struct cmd *self, struct cmd_q *cmdq)
|
|||
return (CMD_RETURN_ERROR);
|
||||
}
|
||||
|
||||
pb = paste_get_index(&global_buffers, buffer);
|
||||
pb = paste_get_index(buffer);
|
||||
if (pb == NULL) {
|
||||
cmdq_error(cmdq, "no buffer %d", buffer);
|
||||
return (CMD_RETURN_ERROR);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue