version 1.9, 2009/06/05 18:02:06 |
version 1.10, 2011/07/15 16:50:52 |
|
|
chunk = 1; |
chunk = 1; |
} |
} |
} else if (n > 0) { |
} else if (n > 0) { |
chunk = llength(curwp->w_dotp) - curwp->w_doto + 1; |
chunk = llength(curwp->w_dotp) - curwp->w_doto; |
nextp = lforw(curwp->w_dotp); |
nextp = lforw(curwp->w_dotp); |
|
if (nextp != curbp->b_headp) |
|
chunk++; /* newline */ |
|
if (nextp == curbp->b_headp) |
|
goto done; /* EOL */ |
i = n; |
i = n; |
while (--i) { |
while (--i) { |
if (nextp == curbp->b_headp) |
chunk += llength(nextp); |
break; |
|
chunk += llength(nextp) + 1; |
|
nextp = lforw(nextp); |
nextp = lforw(nextp); |
|
if (nextp != curbp->b_headp) |
|
chunk++; /* newline */ |
|
if (nextp == curbp->b_headp) |
|
break; /* EOL */ |
} |
} |
} else { |
} else { |
/* n <= 0 */ |
/* n <= 0 */ |
|
|
curwp->w_doto = 0; |
curwp->w_doto = 0; |
i = n; |
i = n; |
while (i++) { |
while (i++) { |
if (lback(curwp->w_dotp) == curbp->b_headp) |
if (lforw(curwp->w_dotp)) |
break; |
chunk++; |
curwp->w_dotp = lback(curwp->w_dotp); |
curwp->w_dotp = lback(curwp->w_dotp); |
curwp->w_rflag |= WFMOVE; |
curwp->w_rflag |= WFMOVE; |
chunk += llength(curwp->w_dotp) + 1; |
chunk += llength(curwp->w_dotp); |
} |
} |
} |
} |
/* |
/* |
* KFORW here is a bug. Should be KBACK/KFORW, but we need to |
* KFORW here is a bug. Should be KBACK/KFORW, but we need to |
* rewrite the ldelete code (later)? |
* rewrite the ldelete code (later)? |
*/ |
*/ |
return (ldelete(chunk, KFORW)); |
done: |
|
if (chunk) |
|
return (ldelete(chunk, KFORW)); |
|
return (TRUE); |
} |
} |
|
|
/* |
/* |