1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-06-09 05:20:42 +00:00

Insure message line is correct after startup script execution and command line arguments processed.

This commit is contained in:
Renaud 2015-01-23 22:13:21 +08:00
parent 7018880551
commit fe1eaf7348

19
main.c
View File

@ -196,6 +196,9 @@ int main(int argc, char **argv)
cryptflag = FALSE; /* no encryption by default */ cryptflag = FALSE; /* no encryption by default */
#endif #endif
/* Insure screen is initialized before startup and goto/search */
update( FALSE) ;
/* Parse the command line */ /* Parse the command line */
for (carg = 1; carg < argc; ++carg) { for (carg = 1; carg < argc; ++carg) {
/* Process Switches */ /* Process Switches */
@ -316,18 +319,14 @@ int main(int argc, char **argv)
bp->b_mode |= gmode; bp->b_mode |= gmode;
/* Deal with startup gotos and searches */ /* Deal with startup gotos and searches */
if (gotoflag && searchflag) { if( gotoflag && searchflag)
update(FALSE);
writestr( "(Can not search and goto at the same time!)") ; writestr( "(Can not search and goto at the same time!)") ;
} else if (gotoflag) { else if( gotoflag) {
if (gotoline(TRUE, gline) == FALSE) { if( gotoline( TRUE, gline) == FALSE)
update(FALSE);
writestr( "(Bogus goto argument)") ; writestr( "(Bogus goto argument)") ;
} } else if( searchflag)
} else if (searchflag) { if( forwhunt( FALSE, 0))
if (forwhunt(FALSE, 0) == FALSE) writefmt( "Found on line %d", getcline()) ;
update(FALSE);
}
/* Setup to process commands. */ /* Setup to process commands. */
lastflag = 0; /* Fake last flags. */ lastflag = 0; /* Fake last flags. */