2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
5 * %sccs.include.redist.c%
9 static char sccsid
[] = "$Id: v_yank.c,v 8.9 1993/11/04 16:17:28 bostic Exp $ (Berkeley) $Date: 1993/11/04 16:17:28 $";
12 #include <sys/types.h>
18 * v_yank -- [buffer][count]Y
19 * [buffer][count]y[count][motion]
20 * Yank text (or lines of text) into a cut buffer.
23 v_yank(sp
, ep
, vp
, fm
, tm
, rp
)
29 if (F_ISSET(vp
, VC_LMODE
)) {
30 if (file_gline(sp
, ep
, tm
->lno
, NULL
) == NULL
) {
35 F_ISSET(vp
, VC_BUFFER
) ? vp
->buffer
: DEFCB
, fm
, tm
, 1))
37 } else if (cut(sp
, ep
,
38 F_ISSET(vp
, VC_BUFFER
) ? vp
->buffer
: DEFCB
, fm
, tm
, 0))
41 sp
->rptlines
[L_YANKED
] += tm
->lno
- fm
->lno
+ 1;