mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-17 00:51:36 +02:00
Swap in new paste buffer code and add a couple more commands.
This commit is contained in:
6
paste.c
6
paste.c
@ -1,4 +1,4 @@
|
||||
/* $Id: paste.c,v 1.1 2008-06-20 08:36:20 nicm Exp $ */
|
||||
/* $Id: paste.c,v 1.2 2008-06-20 17:31:48 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -105,7 +105,7 @@ paste_add(struct paste_stack *ps, const char *data)
|
||||
ARRAY_INSERT(ps, 0, pb);
|
||||
|
||||
pb->data = xstrdup(data);
|
||||
if (clock_gettime(CLOCK_REALTIME, &pb->created) != 0)
|
||||
if (clock_gettime(CLOCK_REALTIME, &pb->ts) != 0)
|
||||
fatal("clock_gettime");
|
||||
}
|
||||
|
||||
@ -121,7 +121,7 @@ paste_replace(struct paste_stack *ps, u_int idx, const char *data)
|
||||
xfree(pb->data);
|
||||
|
||||
pb->data = xstrdup(data);
|
||||
if (clock_gettime(CLOCK_REALTIME, &pb->created) != 0)
|
||||
if (clock_gettime(CLOCK_REALTIME, &pb->ts) != 0)
|
||||
fatal("clock_gettime");
|
||||
|
||||
return (0);
|
||||
|
Reference in New Issue
Block a user