Consistent use of upmode() to update all mode lines.

This commit is contained in:
Renaud 2015-10-22 15:26:07 +08:00
parent c1ebad4808
commit 9b1c5f48a2
1 changed files with 4 additions and 13 deletions

17
bind.c
View File

@ -44,7 +44,6 @@ int help(int f, int n)
{ /* give me some help!!!!
bring up a fake buffer and read the help file
into it with view mode */
struct window *wp; /* scaning pointer to windows */
struct buffer *bp; /* buffer pointer to help */
char *fname = NULL; /* ptr to file returned by flook() */
@ -73,11 +72,7 @@ int help(int f, int n)
/* make this window in VIEW mode, update all mode lines */
curwp->w_bufp->b_mode |= MDVIEW;
curwp->w_bufp->b_flag |= BFINVS;
wp = wheadp;
while (wp != NULL) {
wp->w_flag |= WFMODE;
wp = wp->w_wndp;
}
upmode() ;
return TRUE;
}
@ -387,15 +382,11 @@ static int buildlist( char *mstring) {
}
}
curwp->w_bufp->b_mode |= MDVIEW; /* put this buffer view mode */
curbp->b_flag &= ~BFCHG; /* don't flag this as a change */
bp->b_mode |= MDVIEW; /* put this buffer view mode */
bp->b_flag &= ~BFCHG; /* don't flag this as a change */
wp->w_dotp = lforw(bp->b_linep); /* back to the beginning */
wp->w_doto = 0;
wp = wheadp; /* and update ALL mode lines */
while (wp != NULL) {
wp->w_flag |= WFMODE;
wp = wp->w_wndp;
}
upmode() ; /* and update ALL mode lines */
mlwrite(""); /* clear the mode line */
return TRUE;
}