commit 38743b0016dcb0a155f0eddefe1f8c23ed4b494e
parent 68c3aaf2df880206a10aa00eed5f26e793800790
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Wed, 27 Nov 2019 11:56:35 +0100
tweaks: reshuffle an 'if' to avoid a negation, and improve a comment
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/files.c b/src/files.c
@@ -605,13 +605,13 @@ void redecorate_after_switch(void)
}
#ifndef NANO_TINY
- /* When not in softwrap mode, make sure firstcolumn is zero. It might
- * be nonzero if we had softwrap mode on while in this buffer, and then
- * turned softwrap mode off while in a different buffer. */
- if (!ISSET(SOFTWRAP))
- openfile->firstcolumn = 0;
- else
+ /* While in a different buffer, the screen may have been resized
+ * or softwrap mode maybe have been toggled, so make sure that the
+ * starting column for the first row gets an appropriate value. */
+ if (ISSET(SOFTWRAP))
ensure_firstcolumn_is_aligned();
+ else
+ openfile->firstcolumn = 0;
#endif
/* Update titlebar and multiline info to match the current buffer. */