mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-18 07:16:23 -05:00
Compare commits
2 Commits
a00f12b614
...
3889f1709c
Author | SHA1 | Date | |
---|---|---|---|
3889f1709c | |||
8540adea9e |
19
word.c
19
word.c
@ -352,9 +352,8 @@ static int parafillnjustify( int f, int n, int justify_f) {
|
||||
int wbufsize ;
|
||||
int wordlen; /* length of current word */
|
||||
int clength; /* position on line during fill */
|
||||
// int i; /* index during word copy */
|
||||
int eopflag; /* Are we at the End-Of-Paragraph? */
|
||||
int firstflag; /* first word? (needs no space) */
|
||||
int firstflag = TRUE ; /* first word? (needs no space) */
|
||||
struct line *eopline; /* pointer to line just past EOP */
|
||||
int dotflag = 0 ; /* was the last char a period? */
|
||||
int leftmarg = 0 ; /* left marginal */
|
||||
@ -387,18 +386,24 @@ static int parafillnjustify( int f, int n, int justify_f) {
|
||||
gotoeop(FALSE, 1);
|
||||
eopline = lforw(curwp->w_dotp);
|
||||
|
||||
/* and back top the beginning of the paragraph */
|
||||
/* and back to the beginning of the paragraph */
|
||||
gotobop(FALSE, 1);
|
||||
|
||||
/* initialize various info */
|
||||
if( justflag && leftmarg < llength(curwp->w_dotp))
|
||||
if( justflag && leftmarg < llength(curwp->w_dotp)) {
|
||||
setccol( leftmarg) ;
|
||||
lgetchar( &c) ;
|
||||
if( c == ' ' || c == '\t')
|
||||
/* on a space */
|
||||
if( getccol( TRUE) < getccol( FALSE))
|
||||
/* first non space before current position */
|
||||
firstflag = FALSE ;
|
||||
}
|
||||
|
||||
clength = getccol( FALSE) ;
|
||||
wordlen = 0;
|
||||
|
||||
/* scan through lines, filling words */
|
||||
firstflag = TRUE;
|
||||
eopflag = FALSE;
|
||||
while (!eopflag) {
|
||||
int bytes = 1;
|
||||
@ -458,7 +463,11 @@ static int parafillnjustify( int f, int n, int justify_f) {
|
||||
wordlen = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* and add a last newline for the end of our new paragraph */
|
||||
if( eopline == curbp->b_linep) /* at EOF? */
|
||||
forwchar( FALSE, 1) ;
|
||||
else
|
||||
lnewline() ;
|
||||
|
||||
if( justflag) {
|
||||
|
Loading…
Reference in New Issue
Block a user