commit 9c2e270b3efa10e09355d58eb39255356a58101a
parent 0eef5610eb041c6bef773058072519e0f5d1423f
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Fri, 28 Oct 2016 10:50:06 +0200
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.
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/nano.c b/src/nano.c
@@ -2560,6 +2560,8 @@ int main(int argc, char **argv)
* dimensions. */
window_init();
+ editwincols = COLS;
+
/* Set up the signal handlers. */
signal_init();