Except C-k which has a defined behaviour. In mg, C-t doesn't complete
n iterations if requested, but probably should, hence it has been
included in this diff.
-/* $OpenBSD: basic.c,v 1.46 2015/09/26 21:51:58 jasper Exp $ */
+/* $OpenBSD: basic.c,v 1.47 2015/10/10 09:13:14 lum Exp $ */
/* This file is in the public domain */
int
gotobol(int f, int n)
{
+ if (n == 0)
+ return (TRUE);
+
curwp->w_doto = 0;
return (TRUE);
}
int
gotoeol(int f, int n)
{
+ if (n == 0)
+ return (TRUE);
+
curwp->w_doto = llength(curwp->w_dotp);
return (TRUE);
}
-/* $OpenBSD: paragraph.c,v 1.40 2015/09/26 15:03:15 lum Exp $ */
+/* $OpenBSD: paragraph.c,v 1.41 2015/10/10 09:13:14 lum Exp $ */
/* This file is in the public domain. */
struct line *eopline; /* pointer to line just past EOP */
char wbuf[MAXWORD]; /* buffer for current word */
+ if (n == 0)
+ return (TRUE);
+
undo_boundary_enable(FFRAND, 0);
/* record the pointer to the line just past the EOP */
{
int lineno, status;
+ if (n == 0)
+ return (TRUE);
+
if (findpara() == FALSE)
return (TRUE);
{
int i = 0;
+ if (n == 0)
+ return (TRUE);
+
clearmark(FFARG, 0);
if (findpara() == FALSE)
int i = 0, status;
char flg;
+ if (n == 0)
+ return (TRUE);
+
/* find a paragraph, set mark, then goto the end */
gotobop(FFRAND, 1);
curwp->w_markp = curwp->w_dotp;
-/* $OpenBSD: util.c,v 1.36 2015/09/29 03:19:24 guenther Exp $ */
+/* $OpenBSD: util.c,v 1.37 2015/10/10 09:13:14 lum Exp $ */
/* This file is in the public domain. */
struct line *dotp;
int doto, cr;
+ if (n == 0)
+ return (TRUE);
+
dotp = curwp->w_dotp;
doto = curwp->w_doto;