softwrap: initialize 'editwincols' early, for computing the number of wraps

When giving a line number on the command line, do_gotolinecolumn() needs
to know the width of the screen to be able to (roughly) place the target
line in the center of the screen.

This fixes https://savannah.gnu.org/bugs/?49462.
master
Benno Schulenberg 2016-10-28 10:50:06 +02:00
parent 0eef5610eb
commit 9c2e270b3e
1 changed files with 2 additions and 0 deletions

View File

@ -2560,6 +2560,8 @@ int main(int argc, char **argv)
* dimensions. */
window_init();
editwincols = COLS;
/* Set up the signal handlers. */
signal_init();