1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/* newline.c - move to the next line
*
* Modifications:
* 26-Nov-1991 mz Strip off near/far
*/
#include "mep.h"
/* move to a new line unless in insert mode, then we split the current line
*/
flagType
emacsnewl (
CMDDATA argData,
ARG *pArg,
flagType fMeta
) {
int tmpx;
if (fInsert && !argcount) {
tmpx = softcr ();
CopyStream (NULL, pFileHead, XCUR (pInsCur), YCUR (pInsCur),
tmpx, YCUR (pInsCur)+1,
XCUR (pInsCur), YCUR (pInsCur));
redraw( pFileHead, YCUR(pInsCur)-1, YCUR(pInsCur)+1 );
docursor (tmpx, YCUR (pInsCur)+1);
return TRUE;
} else {
return newline (argData, pArg, fMeta);
}
}
flagType
newline (
CMDDATA argData,
ARG *pArg,
flagType fMeta
) {
docursor (fMeta ? 0 : softcr (), YCUR(pInsCur)+1);
return TRUE;
argData; pArg;
}
|