version 1.48, 2023/04/21 13:39:37 |
version 1.49, 2023/04/21 14:14:13 |
|
|
int |
int |
space_to_tabstop(int f, int n) |
space_to_tabstop(int f, int n) |
{ |
{ |
int c; |
int col, target; |
|
|
if (n < 0) |
if (n < 0) |
return (FALSE); |
return (FALSE); |
if (n == 0) |
if (n == 0) |
return (TRUE); |
return (TRUE); |
|
|
c = curwp->w_doto; |
col = target = getcolpos(curwp); |
while (n-- > 0) |
while (n-- > 0) |
c = ntabstop(c, curbp->b_tabw); |
target = ntabstop(target, curbp->b_tabw); |
return (linsert(c - curwp->w_doto, ' ')); |
return (linsert(target - col, ' ')); |
} |
} |
|
|
/* |
/* |